Speed up message migration further

This commit is contained in:
Fedor Indutny
2024-08-01 14:43:04 -07:00
committed by GitHub
parent 098f54602e
commit 6940c532ea
+2 -2
View File
@@ -987,8 +987,8 @@ export async function startApp(): Promise<void> {
`Starting background data migration. Target version: ${Message.CURRENT_SCHEMA_VERSION}`
);
idleDetector.on('idle', async () => {
const NUM_MESSAGES_PER_BATCH = 25;
const BATCH_DELAY = durations.SECOND / 2;
const NUM_MESSAGES_PER_BATCH = 1000;
const BATCH_DELAY = durations.SECOND / 4;
if (isIdleTaskProcessing) {
log.warn(