fix: stats to monitor

This commit is contained in:
Neon 2025-03-11 10:57:25 -04:00 committed by GitHub
parent 9e67c5cfb0
commit 2fe875fcfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,7 @@
import { ModifiedApp } from "./slackapp";
import pidusage from "pidusage";
const THRESHOLD_CPU = 80; // In percentage
const THRESHOLD_MEM = 700 * 1024 * 1024; // 700MB
const THRESHOLD_CPU = 85; // In percentage
const THRESHOLD_MEM = 850 * 1024 * 1024; // 850mb
export default function monitorMemCpu(app: ModifiedApp) {
setInterval(() => {
pidusage(process.pid, (err, stats) => {
@ -22,5 +22,5 @@ export default function monitorMemCpu(app: ModifiedApp) {
});
}
});
}, 3000);
}, 30_000);
}