From 5776c00dce6bccb1a75fadc5809c1e38cfe6f6bc Mon Sep 17 00:00:00 2001 From: Grendgi Date: Fri, 12 Jun 2026 16:26:24 +0300 Subject: [PATCH] Retry learning database connection on startup --- cmd/server/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)