SYNC: health

This commit is contained in:
SPRINX0\prochazka
2025-03-17 14:11:31 +01:00
committed by Diflow
parent 3bb4652a49
commit 2c9fc7b4a7

View File

@@ -7,18 +7,20 @@ const runners = require('../controllers/runners');
async function getHealthStatus() {
const memory = process.memoryUsage();
const cpuUsage = process.cpuUsage();
return {
status: 'ok',
databaseConnectionCount: databaseConnections.opened.length,
serverConnectionCount: serverConnections.opened.length,
sessionCount: sessions.opened.length,
runProcessCount: runners.opened.length,
memory,
cpuUsage,
systemMemory: {
total: os.totalmem(),
free: os.freemem(),
},
runProcessCount: runners.opened.length,
};
}