slack and rocket.chat use the primary base url

env var to show time logger
This commit is contained in:
LouisLam
2021-10-07 17:39:58 +08:00
parent b69550f5b9
commit e5f6d7f047
9 changed files with 93 additions and 36 deletions

View File

@@ -166,7 +166,9 @@ class Monitor extends BeanModel {
}
}
debug("Cert Info Query Time: " + (dayjs().valueOf() - certInfoStartTime) + "ms");
if (process.env.TIMELOGGER === "1") {
debug("Cert Info Query Time: " + (dayjs().valueOf() - certInfoStartTime) + "ms");
}
if (this.type === "http") {
bean.status = UP;
@@ -530,6 +532,7 @@ class Monitor extends BeanModel {
const uptime = await this.calcUptime(duration, monitorID);
io.to(userID).emit("uptime", monitorID, duration, uptime);
}
}
module.exports = Monitor;