aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorkamtschatka <simon.schatka@gmx.at>2024-07-21 23:08:06 +0200
committerGitHub <noreply@github.com>2024-07-21 22:08:06 +0100
commitc5c62de28944077004f01960ee9f7e12b7d26c2c (patch)
treea31c88ff70938c4afe062afbdb078ea3cb83df9a /apps
parent4c23ea931dc01e0d99869eb518c85f891d006baa (diff)
downloadkarakeep-c5c62de28944077004f01960ee9f7e12b7d26c2c.tar.zst
fix: async/await issues with the new queue (#319)
Diffstat (limited to 'apps')
-rw-r--r--apps/workers/crawlerWorker.ts4
-rw-r--r--apps/workers/openaiWorker.ts2
2 files changed, 3 insertions, 3 deletions
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<ZCrawlLinkRequest>) {
// 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();
diff --git a/apps/workers/openaiWorker.ts b/apps/workers/openaiWorker.ts
index 9e6e2f23..55695938 100644
--- a/apps/workers/openaiWorker.ts
+++ b/apps/workers/openaiWorker.ts
@@ -397,5 +397,5 @@ async function runOpenAI(job: DequeuedJob<ZOpenAIRequest>) {
await connectTags(bookmarkId, tags, bookmark.userId);
// Update the search index
- triggerSearchReindex(bookmarkId);
+ await triggerSearchReindex(bookmarkId);
}