add postgres connection test
This commit is contained in:
@@ -17,6 +17,11 @@ func InitPostgres(ctx context.Context) {
|
||||
os.Exit(1)
|
||||
}
|
||||
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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user