We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81a3463 commit 8f7cf57Copy full SHA for 8f7cf57
apps/monitor/src/plugins/processes.js
@@ -1,6 +1,10 @@
1
const { execSync } = require('child_process');
2
const { log, ses } = require('../node-common')(['log', 'ses']);
3
4
+/** Grace period before starting alerting */
5
+const GRACE_PERIOD_MS = 1000 * 60 * 5;
6
+
7
+const start = Date.now();
8
let notified = false;
9
10
/**
@@ -13,6 +17,12 @@ module.exports = async (args) => {
13
17
if (!PROCESSES.length) throw new Error('No processes to monitor');
14
18
15
19
const stoppedProcesses = [];
20
+ const now = Date.now();
21
22
+ if (now - start < GRACE_PERIOD_MS) {
23
+ log.debug('Within processes.js GRACE_PERIOD');
24
+ return;
25
+ }
16
26
27
try {
28
// Get processes
0 commit comments