mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-30 18:24:03 +00:00
Use new logging mechanism
This commit is contained in:
parent
b7e2489d22
commit
60f8ab7285
1 changed files with 1 additions and 1 deletions
|
@ -473,7 +473,7 @@ class Monitor extends BeanModel {
|
||||||
let timeSinceLastNotified = (dayjs.utc().valueOf() - (bean.lastNotifiedTime == null ? 0 : dayjs.utc(bean.lastNotifiedTime).valueOf())) / 1000 / 60; // divide by 1000 to convert from milliseconds to seconds and divide by 60 to convert from seconds to minutes
|
let timeSinceLastNotified = (dayjs.utc().valueOf() - (bean.lastNotifiedTime == null ? 0 : dayjs.utc(bean.lastNotifiedTime).valueOf())) / 1000 / 60; // divide by 1000 to convert from milliseconds to seconds and divide by 60 to convert from seconds to minutes
|
||||||
if (timeSinceLastNotified >= this.resendInterval) {
|
if (timeSinceLastNotified >= this.resendInterval) {
|
||||||
// Send notification again, because we are still DOWN
|
// Send notification again, because we are still DOWN
|
||||||
debug(`[${this.name}] sendNotification again: lastNotifiedTime: ${bean.lastNotifiedTime} | current time: ${R.isoDateTime(dayjs.utc())}`);
|
log.debug("monitor", `[${this.name}] sendNotification again: lastNotifiedTime: ${bean.lastNotifiedTime} | current time: ${R.isoDateTime(dayjs.utc())}`);
|
||||||
await Monitor.sendNotification(isFirstBeat, this, bean);
|
await Monitor.sendNotification(isFirstBeat, this, bean);
|
||||||
|
|
||||||
// Set last notified time to now
|
// Set last notified time to now
|
||||||
|
|
Loading…
Reference in a new issue