projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
11167: Merge branch 'master' into 11167-wb-remove-arvget
[arvados.git]
/
services
/
ws
/
event_source.go
diff --git
a/services/ws/event_source.go
b/services/ws/event_source.go
index edeb647e4628e675be696cb68f4b61892b4cc606..cfb828b2a5d84c6d16407866374e1f4900185f84 100644
(file)
--- a/
services/ws/event_source.go
+++ b/
services/ws/event_source.go
@@
-248,7
+248,8
@@
func (ps *pgEventSource) DB() *sql.DB {
}
func (ps *pgEventSource) DBHealth() error {
}
func (ps *pgEventSource) DBHealth() error {
- ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(time.Second))
+ ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(time.Second))
+ defer cancel()
var i int
return ps.db.QueryRowContext(ctx, "SELECT 1").Scan(&i)
}
var i int
return ps.db.QueryRowContext(ctx, "SELECT 1").Scan(&i)
}