mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
Preparing
This commit is contained in:
parent
c567e8eb8e
commit
2dfa6886b4
2 changed files with 20 additions and 0 deletions
|
@ -711,6 +711,15 @@ class Database {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: Migrate the old data in the heartbeat table to the new format (stat_daily, stat_hourly, stat_minutely)
|
||||
* It should be run once while upgrading V1 to V2
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
static async migrateAggregateTable() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Database;
|
||||
|
|
|
@ -11,6 +11,17 @@ const DEFAULT_KEEP_PERIOD = 180;
|
|||
*/
|
||||
|
||||
const clearOldData = async () => {
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* Since we have aggregated table now, we don't need so much data in heartbeat table.
|
||||
* But we still need to keep the important rows, because they contain the message.
|
||||
*
|
||||
* In the heartbeat table:
|
||||
* - important rows: keep according to the setting (keepDataPeriodDays) (default 180 days)
|
||||
* - not important rows: keep 2 days
|
||||
*/
|
||||
|
||||
let period = await setting("keepDataPeriodDays");
|
||||
|
||||
// Set Default Period
|
||||
|
|
Loading…
Reference in a new issue