mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-10 18:41:33 +08:00
Feat: Run incremental_vacuum and optimize
This commit is contained in:
@@ -39,6 +39,8 @@ const clearOldData = async () => {
|
||||
"DELETE FROM heartbeat WHERE time < DATETIME('now', '-' || ? || ' days') ",
|
||||
[ parsedPeriod ]
|
||||
);
|
||||
|
||||
await R.exec("PRAGMA optimize;");
|
||||
} catch (e) {
|
||||
log.error("clearOldData", `Failed to clear old data: ${e.message}`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user