mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-30 10:14:03 +00:00
wip
This commit is contained in:
parent
4632030a5e
commit
fe91ffcc9d
2 changed files with 32 additions and 26 deletions
|
@ -13,6 +13,9 @@ const DEFAULT_KEEP_PERIOD = 180;
|
||||||
|
|
||||||
const clearOldData = async () => {
|
const clearOldData = async () => {
|
||||||
|
|
||||||
|
// TODO: Temporary disable for testing
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO:
|
* TODO:
|
||||||
* Since we have aggregated table now, we don't need so much data in heartbeat table.
|
* Since we have aggregated table now, we don't need so much data in heartbeat table.
|
||||||
|
|
|
@ -305,6 +305,8 @@ class UptimeCalculator {
|
||||||
}
|
}
|
||||||
await R.store(dailyStatBean);
|
await R.store(dailyStatBean);
|
||||||
|
|
||||||
|
// TODO: For migration mode, we don't need to store old hourly and minutely data, but we need 24-hour's minutely data and 30-day's hourly data
|
||||||
|
if (false) {
|
||||||
let hourlyStatBean = await this.getHourlyStatBean(hourlyKey);
|
let hourlyStatBean = await this.getHourlyStatBean(hourlyKey);
|
||||||
hourlyStatBean.up = hourlyData.up;
|
hourlyStatBean.up = hourlyData.up;
|
||||||
hourlyStatBean.down = hourlyData.down;
|
hourlyStatBean.down = hourlyData.down;
|
||||||
|
@ -334,8 +336,9 @@ class UptimeCalculator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await R.store(minutelyStatBean);
|
await R.store(minutelyStatBean);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: it seems that it is also necessary to remove the old data in the migration mode
|
// No need to remove old data in migration mode
|
||||||
if (!this.migrationMode) {
|
if (!this.migrationMode) {
|
||||||
// Remove the old data
|
// Remove the old data
|
||||||
log.debug("uptime-calc", "Remove old data");
|
log.debug("uptime-calc", "Remove old data");
|
||||||
|
|
Loading…
Reference in a new issue