mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 15:37:07 +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 { Request, Response } from "express";
|
||||
import os from "os";
|
||||
@@ -45,6 +45,7 @@ export async function getStatus(req: Request, res: Response): Promise<Response>
|
||||
statusRequests,
|
||||
hostname: os.hostname(),
|
||||
postgresStats: (db as Postgres)?.getStats?.(),
|
||||
postgresPrivateStats: (privateDB as Postgres)?.getStats?.(),
|
||||
redisStats: getRedisStats(),
|
||||
};
|
||||
return value ? res.send(JSON.stringify(statusValues[value])) : res.send(statusValues);
|
||||
|
||||
Reference in New Issue
Block a user