Make comment more readable

Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
OidaTiftla 2022-04-21 17:45:58 +02:00 committed by GitHub
parent 19933bbd99
commit d6b591a513
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -470,7 +470,8 @@ class Monitor extends BeanModel {
bean.important = false;
if (bean.status === DOWN && this.resendInterval > 0) {
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
// 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;
if (timeSinceLastNotified >= this.resendInterval) {
// Send notification again, because we are still DOWN
log.debug("monitor", `[${this.name}] sendNotification again: lastNotifiedTime: ${bean.lastNotifiedTime} | current time: ${R.isoDateTime(dayjs.utc())}`);