Skip to content

Commit

Permalink
Update clear stats (#4324)
Browse files Browse the repository at this point in the history
  • Loading branch information
louislam committed Jan 5, 2024
1 parent 25cb787 commit 9356e7d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,14 @@ let needSetup = false;
log.info("manage", `Clear Statistics User ID: ${socket.userID}`);

await R.exec("DELETE FROM heartbeat");
await R.exec("DELETE FROM stat_daily");
await R.exec("DELETE FROM stat_hourly");
await R.exec("DELETE FROM stat_minutely");

// Restart all monitors to reset the stats
for (let monitorID in server.monitorList) {
await restartMonitor(socket.userID, monitorID);
}

callback({
ok: true,
Expand Down

0 comments on commit 9356e7d

Please sign in to comment.