Sync branch magefile with main #104308

Merged
Sybren A. Stüvel merged 85 commits from abelli/flamenco:magefile into magefile 2024-05-13 16:26:32 +02:00
Showing only changes of commit 7277286391 - Show all commits

View File

@ -56,6 +56,10 @@ const (
developmentWebInterfacePort = 8081 developmentWebInterfacePort = 8081
webappEntryPoint = "index.html" webappEntryPoint = "index.html"
// dbOpenTimeout is the time the persistence layer gets to open the database.
// This includes database migrations, which can take some time to perform.
dbOpenTimeout = 1 * time.Minute
) )
type shutdownFunc func() type shutdownFunc func()
@ -379,7 +383,7 @@ func openDB(configService config.Service) *persistence.DB {
log.Fatal().Msg("configure the database in flamenco-manager.yaml") log.Fatal().Msg("configure the database in flamenco-manager.yaml")
} }
dbCtx, dbCtxCancel := context.WithTimeout(context.Background(), 5*time.Second) dbCtx, dbCtxCancel := context.WithTimeout(context.Background(), dbOpenTimeout)
defer dbCtxCancel() defer dbCtxCancel()
persist, err := persistence.OpenDB(dbCtx, dsn) persist, err := persistence.OpenDB(dbCtx, dsn)
if err != nil { if err != nil {