From c5c62de28944077004f01960ee9f7e12b7d26c2c Mon Sep 17 00:00:00 2001 From: kamtschatka Date: Sun, 21 Jul 2024 23:08:06 +0200 Subject: fix: async/await issues with the new queue (#319) --- apps/workers/crawlerWorker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/workers/crawlerWorker.ts') diff --git a/apps/workers/crawlerWorker.ts b/apps/workers/crawlerWorker.ts index a1917523..bb226a27 100644 --- a/apps/workers/crawlerWorker.ts +++ b/apps/workers/crawlerWorker.ts @@ -653,13 +653,13 @@ async function runCrawler(job: DequeuedJob) { // Enqueue openai job (if not set, assume it's true for backward compatibility) if (job.data.runInference !== false) { - OpenAIQueue.enqueue({ + await OpenAIQueue.enqueue({ bookmarkId, }); } // Update the search index - triggerSearchReindex(bookmarkId); + await triggerSearchReindex(bookmarkId); // Do the archival as a separate last step as it has the potential for failure await archivalLogic(); -- cgit v1.2.3-70-g09d2