From bb7d67f717d6a8f0a541fb18e6bfa6bc7b281b09 Mon Sep 17 00:00:00 2001 From: Aram Akhavan Date: Fri, 6 May 2022 09:58:05 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Adam Stachowicz --- server/model/monitor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index d1107a37f..1bde1cb71 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -350,9 +350,9 @@ class Monitor extends BeanModel { } else if (this.type === "push") { // Type: Push log.debug(`[${this.name}] Checking monitor at ${dayjs().format("YYYY-MM-DD HH:mm:ss.SSS")}`); const bufferTime = 1000; // 1s buffer to accommodate clock differences - // Fix #922, since previous heartbeat could be inserted by api, it should get from database + // Fix #922, since previous heartbeat could be inserted by API, it should get from database previousBeat = await Monitor.getPreviousHeartbeat(this.id); - //If the previous beat was nonexistent, down or pending we use the regular + // If the previous beat was nonexistent, down or pending we use the regular // beatInterval/retryInterval in the setTimeout further below if (previousBeat) { const msSinceLastBeat = dayjs.utc().valueOf() - dayjs.utc(previousBeat.time).valueOf();