Don't start alerting checks until after a minute

This commit is contained in:
Akkadius 2017-09-14 04:33:36 -05:00
parent 5fd98d6ad0
commit 359c571d24
1 changed files with 84 additions and 83 deletions

3
app.js
View File

@ -370,7 +370,7 @@ function slack_message(message) {
alert_status = []; alert_status = [];
alert_status['leases_per_minute'] = 0; alert_status['leases_per_minute'] = 0;
setTimeout(function(){
alert_check_timer = setInterval(function(){ alert_check_timer = setInterval(function(){
console.log("[Timer] Alert Timer check"); console.log("[Timer] Alert Timer check");
if(glass_config.leases_per_minute_threshold > 0) { if(glass_config.leases_per_minute_threshold > 0) {
@ -466,6 +466,7 @@ alert_subnet_check_timer = setInterval(function(){
} }
} }
}, (5 * 1000)); }, (5 * 1000));
}, 60 * 1000);
function round(num, places) { function round(num, places) {
var multiplier = Math.pow(10, places); var multiplier = Math.pow(10, places);