diff --git a/cmd/server/main.go b/cmd/server/main.go index 1b2dbaf..25c33bb 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -32,7 +32,7 @@ func main() { ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) defer stop() - pool, err := commondb.ConnectURL(cfg.DatabaseURL) + pool, err := commondb.ConnectWithRetry(ctx, cfg.DatabaseURL, 2*time.Minute) if err != nil { slog.Error("connect database", "error", err) os.Exit(1)