From 32c9dfbb314837052ab93bcd6949cdd82d434022 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Thu, 23 Sep 2021 23:21:08 +0800 Subject: [PATCH] Fix: clear important beats after deleteMonitor --- server/database.js | 1 + server/server.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/server/database.js b/server/database.js index 2f6c1c5fe..4cf1e3933 100644 --- a/server/database.js +++ b/server/database.js @@ -107,6 +107,7 @@ class Database { R.freeze(true); await R.autoloadModels("./server/model"); + await R.exec("PRAGMA foreign_keys = ON"); // Change to WAL await R.exec("PRAGMA journal_mode = WAL"); await R.exec("PRAGMA cache_size = -12000"); diff --git a/server/server.js b/server/server.js index 51095365f..5b5d6b23d 100644 --- a/server/server.js +++ b/server/server.js @@ -637,6 +637,8 @@ exports.entryPage = "dashboard"; }); await sendMonitorList(socket); + // Clear heartbeat list on client + await sendImportantHeartbeatList(socket, monitorID, true, true); } catch (e) { callback({