aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workers
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-09-06 05:23:23 +0000
committerMohamed Bassem <me@mbassem.com>2025-09-06 05:40:36 +0000
commit80a10231ad4c496c917aed084f9d45e6dcca191a (patch)
tree60433b0031ae15405e932701210d761ef46d8a9c /apps/workers
parent473845a77195067a9ac10a7fcf7b8c32e36150da (diff)
downloadkarakeep-80a10231ad4c496c917aed084f9d45e6dcca191a.tar.zst
fix: Don't enqueue video tasks when video downlaod is disabled
Diffstat (limited to 'apps/workers')
-rw-r--r--apps/workers/workers/crawlerWorker.ts18
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/workers/workers/crawlerWorker.ts b/apps/workers/workers/crawlerWorker.ts
index bec10acf..36068f14 100644
--- a/apps/workers/workers/crawlerWorker.ts
+++ b/apps/workers/workers/crawlerWorker.ts
@@ -1150,14 +1150,16 @@ async function runCrawler(job: DequeuedJob<ZCrawlLinkRequest>) {
// Update the search index
await triggerSearchReindex(bookmarkId, enqueueOpts);
- // Trigger a potential download of a video from the URL
- await VideoWorkerQueue.enqueue(
- {
- bookmarkId,
- url,
- },
- enqueueOpts,
- );
+ if (serverConfig.crawler.downloadVideo) {
+ // Trigger a potential download of a video from the URL
+ await VideoWorkerQueue.enqueue(
+ {
+ bookmarkId,
+ url,
+ },
+ enqueueOpts,
+ );
+ }
// Trigger a webhook
await triggerWebhook(bookmarkId, "crawled", undefined, enqueueOpts);