Adds GET /api/health/services returning registry services grouped by category with merged cached status and per-group healthy counts, and POST /api/health/check (owner-only) that enqueues a health.check pg-boss job. Registers the health_check worker in the jobs index.
17 lines
586 B
JavaScript
17 lines
586 B
JavaScript
import * as queue from './queue.js';
|
|
import * as echo from './workers/echo.js';
|
|
import * as url from './workers/url.js';
|
|
import * as blob from './workers/blob.js';
|
|
import * as embed from './workers/embed.js';
|
|
import * as karakeep from './workers/karakeep.js';
|
|
import * as speedtest from './workers/speedtest.js';
|
|
import * as healthCheck from './workers/health_check.js';
|
|
|
|
const WORKERS = [echo, url, blob, embed, karakeep, speedtest, healthCheck];
|
|
|
|
export async function registerWorkers() {
|
|
for (const w of WORKERS) {
|
|
await queue.subscribe(w.NAME, w.handler, w.opts || {});
|
|
}
|
|
}
|