add postgres connection test

This commit is contained in:
2026-05-16 20:56:14 +00:00
parent de106c61fe
commit 9c24bdca1f
+5
View File
@@ -17,6 +17,11 @@ func InitPostgres(ctx context.Context) {
os.Exit(1) os.Exit(1)
} }
Pool = pool Pool = pool
err = pool.Ping(ctx)
if err != nil {
slog.Error("Failed to connect to Postgres", "error", err)
os.Exit(1)
}
slog.Info("Connected to Postgres") slog.Info("Connected to Postgres")
} }