atc: open dex conn after atc connection
as a side-effect this ensures we wait until the database is up, rather
than exiting out
@@ -348,17 +348,17 @@ func (cmd *RunCommand) Runner(positionalArguments []string) (ifrit.Runner, error
}
lockFactory := lock.NewLockFactory(lockConn)
- storage, err := storage.NewPostgresStorage(logger, cmd.Postgres)
+ apiConn, err := cmd.constructDBConn(retryingDriverName, logger, 32, "api", lockFactory)
if err != nil {
return nil, err
}
- apiConn, err := cmd.constructDBConn(retryingDriverName, logger, 32, "api", lockFactory)
+ backendConn, err := cmd.constructDBConn(retryingDriverName, logger, 32, "backend", lockFactory)
if err != nil {
return nil, err
}
- backendConn, err := cmd.constructDBConn(retryingDriverName, logger, 32, "backend", lockFactory)
+ storage, err := storage.NewPostgresStorage(logger, cmd.Postgres)
if err != nil {
return nil, err
}
