do not send notification if first beat is UP
This commit is contained in:
parent
072e86542a
commit
ff4259380e
|
@ -109,6 +109,8 @@ class Monitor extends BeanModel {
|
|||
if (! previousBeat || previousBeat.status !== bean.status) {
|
||||
bean.important = true;
|
||||
|
||||
// Do not send if first beat is UP
|
||||
if (previousBeat || bean.status !== 1) {
|
||||
let notificationList = await R.getAll(`SELECT notification.* FROM notification, monitor_notification WHERE monitor_id = ? AND monitor_notification.notification_id = notification.id `, [
|
||||
this.id
|
||||
])
|
||||
|
@ -129,6 +131,7 @@ class Monitor extends BeanModel {
|
|||
}
|
||||
|
||||
await Promise.all(promiseList);
|
||||
}
|
||||
|
||||
} else {
|
||||
bean.important = false;
|
||||
|
|
Loading…
Reference in New Issue