chore: make the logging of uptime_calc more consistent witht he rest of the logs (#6686)

This commit is contained in:
Frank Elsinga 2026-01-12 16:57:41 +01:00 committed by GitHub
parent c7a8b7affd
commit 731ffd2883
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -217,7 +217,7 @@ class UptimeCalculator {
let flatStatus = this.flatStatus(status); let flatStatus = this.flatStatus(status);
if (flatStatus === DOWN && ping > 0) { if (flatStatus === DOWN && ping > 0) {
log.debug("uptime-calc", "The ping is not effective when the status is DOWN"); log.debug("uptime_calc", "The ping is not effective when the status is DOWN");
} }
let divisionKey = this.getMinutelyKey(date); let divisionKey = this.getMinutelyKey(date);
@ -295,7 +295,7 @@ class UptimeCalculator {
// Don't store data in test mode // Don't store data in test mode
if (process.env.TEST_BACKEND) { if (process.env.TEST_BACKEND) {
log.debug("uptime-calc", "Skip storing data in test mode"); log.debug("uptime_calc", "Skip storing data in test mode");
return date; return date;
} }
@ -358,7 +358,7 @@ class UptimeCalculator {
if (!this.migrationMode) { if (!this.migrationMode) {
// Remove the old data // Remove the old data
// TODO: Improvement: Convert it to a job? // TODO: Improvement: Convert it to a job?
log.debug("uptime-calc", "Remove old data"); log.debug("uptime_calc", "Remove old data");
await R.exec("DELETE FROM stat_minutely WHERE monitor_id = ? AND timestamp < ?", [ await R.exec("DELETE FROM stat_minutely WHERE monitor_id = ? AND timestamp < ?", [
this.monitorID, this.monitorID,
this.getMinutelyKey(currentDate.subtract(this.statMinutelyKeepHour, "hour")), this.getMinutelyKey(currentDate.subtract(this.statMinutelyKeepHour, "hour")),