fix: shrink prune batch size 2000->200, production hardware much slower than test box
This commit is contained in:
@@ -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(`
|
||||
|
||||
Reference in New Issue
Block a user