mirror of
https://github.com/System-End/slack-end.git
synced 2026-04-19 23:22:56 +00:00
fix: stats to monitor
This commit is contained in:
parent
9e67c5cfb0
commit
2fe875fcfe
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue