Update backup system and local changes
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 21s
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 21s
- BorgBackup disaster recovery system - Health endpoint updates - Merged with remote changes
This commit is contained in:
parent
ef84279eae
commit
7e74f22ea3
2 changed files with 68 additions and 13 deletions
21
src/routes/health.ts.backup
Normal file
21
src/routes/health.ts.backup
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { Router } from "express";
|
||||
import { getPoolStats } from "../services/browser.js";
|
||||
|
||||
export const healthRouter = Router();
|
||||
|
||||
healthRouter.get("/", (_req, res) => {
|
||||
const pool = getPoolStats();
|
||||
res.json({
|
||||
status: "ok",
|
||||
version: "0.2.1",
|
||||
pool: {
|
||||
size: pool.poolSize,
|
||||
active: pool.totalPages - pool.availablePages,
|
||||
available: pool.availablePages,
|
||||
queueDepth: pool.queueDepth,
|
||||
pdfCount: pool.pdfCount,
|
||||
restarting: pool.restarting,
|
||||
uptimeSeconds: Math.round(pool.uptimeMs / 1000),
|
||||
},
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue