mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-02-11 16:04:24 +01:00
add 30s timeout to startup context
This commit is contained in:
@@ -71,7 +71,8 @@ func main() {
|
||||
|
||||
// Migrate the DB
|
||||
//Todo: use timeout for startupcontext
|
||||
startupCtx := context.Background()
|
||||
startupCtx, startupCancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer startupCancel()
|
||||
migrator := migrate.NewMigrator(dbConn, migrations.Migrations)
|
||||
err = migrator.Init(startupCtx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user