Skip to content

Commit

Permalink
Update server/model/monitor.js
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
  • Loading branch information
kaysond and Saibamen authored Apr 4, 2022
1 parent 85a5d9c commit cf27eab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/model/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ class Monitor extends BeanModel {
} else if (this.type === "push") { // Type: Push
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()
Expand Down

0 comments on commit cf27eab

Please sign in to comment.