mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-26 14:09:45 -08:00
wip
This commit is contained in:
parent
03e507a4e1
commit
0f646e634e
|
@ -776,9 +776,6 @@ class Database {
|
||||||
ORDER BY monitor_id ASC
|
ORDER BY monitor_id ASC
|
||||||
`);
|
`);
|
||||||
|
|
||||||
console.log("Dates", dates);
|
|
||||||
console.log("Monitors", monitors);
|
|
||||||
|
|
||||||
// Stop if stat_* tables are not empty
|
// Stop if stat_* tables are not empty
|
||||||
for (let table of [ "stat_minutely", "stat_hourly", "stat_daily" ]) {
|
for (let table of [ "stat_minutely", "stat_hourly", "stat_daily" ]) {
|
||||||
let countResult = await R.getRow(`SELECT COUNT(*) AS count FROM ${table}`);
|
let countResult = await R.getRow(`SELECT COUNT(*) AS count FROM ${table}`);
|
||||||
|
@ -790,6 +787,8 @@ class Database {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let monitor of monitors) {
|
for (let monitor of monitors) {
|
||||||
|
|
||||||
|
// TODO: Get the date list for each monitor
|
||||||
for (let date of dates) {
|
for (let date of dates) {
|
||||||
|
|
||||||
// New Uptime Calculator
|
// New Uptime Calculator
|
||||||
|
@ -816,7 +815,7 @@ class Database {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//await Settings.set("migratedAggregateTable", true);
|
await Settings.set("migratedAggregateTable", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,6 +339,7 @@ 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
|
||||||
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