log.debug("monitor",`[${this.name}] will not sendNotification because it is (or was) under maintenance`);
log.debug("monitor",`[${this.name}] will not sendNotification because it is (or was) under maintenance`);
}
}
@ -950,7 +948,7 @@ class Monitor extends BeanModel {
}
}
staticasyncisUnderMaintenance(monitorID){
staticasyncisUnderMaintenance(monitorID){
constmaintenance=awaitR.getRow("SELECT COUNT(*) AS count FROM monitor_maintenance mm JOIN maintenance ON mm.maintenance_id = maintenance.id WHERE mm.monitor_id = ? AND datetime(maintenance.start_date) <= datetime('now') AND datetime(maintenance.end_date) >= datetime('now') LIMIT 1",[monitorID]);
constmaintenance=awaitR.getRow("SELECT COUNT(*) AS count FROM monitor_maintenance mm JOIN maintenance ON mm.maintenance_id = maintenance.id WHERE mm.monitor_id = ? AND datetime(maintenance.start_date) <= datetime('now') AND datetime(maintenance.end_date) >= datetime('now') LIMIT 1",[monitorID]);