From 5004da0ea3e695f39751666edfb4a4194a146a0e Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sun, 2 Jul 2023 00:47:55 -0700 Subject: [PATCH] adjust timeout for indexing notes --- packages/backend/src/queue/index.ts | 3 ++- .../backend/src/queue/processors/background/index-all-notes.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/queue/index.ts b/packages/backend/src/queue/index.ts index a84a446fe7..d7580a4f62 100644 --- a/packages/backend/src/queue/index.ts +++ b/packages/backend/src/queue/index.ts @@ -482,7 +482,8 @@ export function createCleanRemoteFilesJob() { export function createIndexAllNotesJob(data = {}) { return backgroundQueue.add("indexAllNotes", data, { removeOnComplete: true, - removeOnFail: true, + removeOnFail: false, + timeout: 1000 * 60 * 60 * 24, }); } diff --git a/packages/backend/src/queue/processors/background/index-all-notes.ts b/packages/backend/src/queue/processors/background/index-all-notes.ts index 10c332aa3b..1dce4406a9 100644 --- a/packages/backend/src/queue/processors/background/index-all-notes.ts +++ b/packages/backend/src/queue/processors/background/index-all-notes.ts @@ -20,7 +20,7 @@ export default async function indexAllNotes( let total: number = (job.data.total as number) ?? 0; let running = true; - const take = 50000; + const take = 100000; const batch = 100; while (running) { logger.info(