fix: shrink prune batch size 2000->200, production hardware much slower than test box

This commit is contained in:
2026-08-22 13:39:56 +02:00
parent bd5f7bfd3a
commit 7c62de0a8a
+3 -1
View File
@@ -77,7 +77,9 @@ let _cache = null, _cacheTs = 0;
// and batching the cleanup.
const PRUNE_AGE = 30 * 86400; // 30 days in seconds
const PRUNE_BATCH = 2000;
const PRUNE_BATCH = 200; // 2000 was still multi-second per batch on production
// hardware (10x slower than the box this was tested
// on) - small enough here to actually stay responsive
const stmtCountOld = DB.prepare('SELECT COUNT(*) n FROM bots WHERE received_at < ?');
const stmtSummarizeBatch = DB.prepare(`