From 9f493bbec7a00c66295ca58e274c951dd465470d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Kr=C3=BDda?= Date: Mon, 9 May 2022 21:02:29 +0200 Subject: [PATCH 1/3] clone master branch --- CNAME | 2 +- public/icon.svg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CNAME b/CNAME index a5348b07..40f0b545 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -git.kuma.pet \ No newline at end of file +git.kuma.pet; diff --git a/public/icon.svg b/public/icon.svg index 825c344e..9c0bc6ca 100644 --- a/public/icon.svg +++ b/public/icon.svg @@ -1,3 +1,3 @@ - \ No newline at end of file + From 7acbfd24749e00c5a17ccb3af74408baf0c1e85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Kr=C3=BDda?= Date: Mon, 9 May 2022 21:05:10 +0200 Subject: [PATCH 2/3] eslint fixes too much --- CNAME | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CNAME b/CNAME index 40f0b545..44250516 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -git.kuma.pet; +git.kuma.pet From 7da9f139c1bd91c80dd880c8b97c0981576c0749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Kr=C3=BDda?= Date: Mon, 9 May 2022 21:10:12 +0200 Subject: [PATCH 3/3] Bug fix --- server/model/monitor.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index f2d16524..eaafb775 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -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