mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
Bug fix
This commit is contained in:
parent
7acbfd2474
commit
7da9f139c1
1 changed files with 1 additions and 4 deletions
|
@ -182,7 +182,7 @@ class Monitor extends BeanModel {
|
|||
// undefined if not https
|
||||
let tlsInfo = undefined;
|
||||
|
||||
if (!previousBeat) {
|
||||
if (!previousBeat || this.type === "push") {
|
||||
previousBeat = await R.findOne("heartbeat", " monitor_id = ? ORDER BY time DESC", [
|
||||
this.id,
|
||||
]);
|
||||
|
@ -377,9 +377,6 @@ class Monitor extends BeanModel {
|
|||
log.debug("monitor", "heartbeatCount" + heartbeatCount + " " + time);
|
||||
|
||||
if (heartbeatCount <= 0) {
|
||||
// Fix #922, since previous heartbeat could be inserted by api, it should get from database
|
||||
previousBeat = await Monitor.getPreviousHeartbeat(this.id);
|
||||
|
||||
throw new Error("No heartbeat in the time window");
|
||||
} else {
|
||||
// No need to insert successful heartbeat for push type, so end here
|
||||
|
|
Loading…
Reference in a new issue