mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 07:27:01 +03:00
Add postgres private db stats
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { db } from "../databases/databases";
|
import { db, privateDB } from "../databases/databases";
|
||||||
import { Logger } from "../utils/logger";
|
import { Logger } from "../utils/logger";
|
||||||
import { Request, Response } from "express";
|
import { Request, Response } from "express";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
@@ -45,6 +45,7 @@ export async function getStatus(req: Request, res: Response): Promise<Response>
|
|||||||
statusRequests,
|
statusRequests,
|
||||||
hostname: os.hostname(),
|
hostname: os.hostname(),
|
||||||
postgresStats: (db as Postgres)?.getStats?.(),
|
postgresStats: (db as Postgres)?.getStats?.(),
|
||||||
|
postgresPrivateStats: (privateDB as Postgres)?.getStats?.(),
|
||||||
redisStats: getRedisStats(),
|
redisStats: getRedisStats(),
|
||||||
};
|
};
|
||||||
return value ? res.send(JSON.stringify(statusValues[value])) : res.send(statusValues);
|
return value ? res.send(JSON.stringify(statusValues[value])) : res.send(statusValues);
|
||||||
|
|||||||
Reference in New Issue
Block a user