mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 10:30:37 +09:00
Fix health DB connectivity probe
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
db4e146551
commit
88e742a129
2 changed files with 54 additions and 3 deletions
|
|
@ -29,6 +29,17 @@ export function healthRoutes(
|
|||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await db.execute(sql`SELECT 1`);
|
||||
} catch {
|
||||
res.status(503).json({
|
||||
status: "unhealthy",
|
||||
version: serverVersion,
|
||||
error: "database_unreachable",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let bootstrapStatus: "ready" | "bootstrap_pending" = "ready";
|
||||
let bootstrapInviteActive = false;
|
||||
if (opts.deploymentMode === "authenticated") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue