edit template

This commit is contained in:
Bel LaPointe
2025-12-11 10:13:02 -07:00
parent 3f69a2d5d5
commit 558d2f7f9d
2 changed files with 7 additions and 11 deletions

View File

@@ -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()
})
}