This commit is contained in:
odzugkoev
2026-05-01 10:48:11 -04:00
parent 1b40187ade
commit 26badf8e6a
3 changed files with 34 additions and 13 deletions

View File

@@ -879,7 +879,8 @@ class DatabaseManager {
cleanOldAbandonedCallCache(maxAgeDays = 7) {
const cutoff = Math.floor(Date.now() / 1000) - (maxAgeDays * 86400);
this.db.prepare('DELETE FROM abandoned_calls_cache WHERE updated_at < ?').run(cutoff);
this.db.prepare('DELETE FROM abandoned_call_prints WHERE printed_at < ?').run(cutoff);
// Print records are dedupe state, not cache. Keep them so old calls do not
// reprint days later after the UI cache has been cleaned.
}
close() {