Revert "cache last heartbeat list in memory"

This reverts commit 87678ea92d.
This commit is contained in:
LouisLam
2021-09-08 19:54:37 +08:00
parent 5a0fcebd6e
commit 0f440596c8
5 changed files with 26 additions and 105 deletions

View File

@@ -33,14 +33,13 @@ async function sendNotificationList(socket) {
async function sendHeartbeatList(socket, monitorID, toUser = false, overwrite = false) {
const timeLogger = new TimeLogger();
let monitor = userMonitorList.getMonitor(socket.userID, monitorID);
if (! monitor) {
console.error("No this monitor??");
return;
}
let list = monitor.getCachedHeartbeatList().array;
let list = await R.find("heartbeat", `
monitor_id = ?
ORDER BY time DESC
LIMIT 100
`, [
monitorID,
])
let result = [];