aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2026-02-08 02:11:51 +0000
committerGitHub <noreply@github.com>2026-02-08 02:11:51 +0000
commitbbd65fd6123f7d1a93d1f6a68f2b933d53ec3c23 (patch)
tree1f23b04b4ca8fbccdea2d61e7c2c0a8b991d87d1 /packages/trpc
parent7d53e2e458cba7153dea27c625ca1bb534952ddf (diff)
downloadkarakeep-bbd65fd6123f7d1a93d1f6a68f2b933d53ec3c23.tar.zst
feat: Add separate queue for import link crawling (#2452)
* feat: add separate queue for import link crawling --------- Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to 'packages/trpc')
-rw-r--r--packages/trpc/routers/bookmarks.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/trpc/routers/bookmarks.ts b/packages/trpc/routers/bookmarks.ts
index 0bbf4fb7..565558c3 100644
--- a/packages/trpc/routers/bookmarks.ts
+++ b/packages/trpc/routers/bookmarks.ts
@@ -19,6 +19,7 @@ import {
import {
AssetPreprocessingQueue,
LinkCrawlerQueue,
+ LowPriorityCrawlerQueue,
OpenAIQueue,
QueuePriority,
QuotaService,
@@ -282,7 +283,12 @@ export const bookmarksAppRouter = router({
switch (bookmark.content.type) {
case BookmarkTypes.LINK: {
// The crawling job triggers openai when it's done
- await LinkCrawlerQueue.enqueue(
+ // Use a separate queue for low priority crawling to avoid impacting main queue parallelism
+ const crawlerQueue =
+ input.crawlPriority === "low"
+ ? LowPriorityCrawlerQueue
+ : LinkCrawlerQueue;
+ await crawlerQueue.enqueue(
{
bookmarkId: bookmark.id,
},