edit template
This commit is contained in:
@@ -25,7 +25,7 @@ func run(ctx context.Context) error {
|
||||
}
|
||||
|
||||
return with.SQL(ctx, *c, func(db *sql.DB) error {
|
||||
go with.Every(ctx, 5*time.Second, func() {
|
||||
with.Every(ctx, 5*time.Second, func() {
|
||||
row := db.QueryRowContext(ctx, `SELECT 1`)
|
||||
var n int
|
||||
if err := row.Err(); err != nil {
|
||||
@@ -36,8 +36,6 @@ func run(ctx context.Context) error {
|
||||
log.Println("ping...")
|
||||
}
|
||||
})
|
||||
|
||||
<-ctx.Done()
|
||||
return nil
|
||||
return ctx.Err()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user