Apply suggestions from code review

Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
This commit is contained in:
Aram Akhavan 2022-05-06 09:58:05 -07:00 committed by GitHub
parent 39df4eea92
commit bb7d67f717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -350,7 +350,7 @@ class Monitor extends BeanModel {
} else if (this.type === "push") { // Type: Push } else if (this.type === "push") { // Type: Push
log.debug(`[${this.name}] Checking monitor at ${dayjs().format("YYYY-MM-DD HH:mm:ss.SSS")}`); 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 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); 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 // beatInterval/retryInterval in the setTimeout further below