Update clear stats (#4324)

This commit is contained in:
Louis Lam 2024-01-05 20:51:05 +08:00 committed by GitHub
parent 25cb78796a
commit 9356e7dd4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,