diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-09-06 05:23:23 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-09-06 05:40:36 +0000 |
| commit | 80a10231ad4c496c917aed084f9d45e6dcca191a (patch) | |
| tree | 60433b0031ae15405e932701210d761ef46d8a9c | |
| parent | 473845a77195067a9ac10a7fcf7b8c32e36150da (diff) | |
| download | karakeep-80a10231ad4c496c917aed084f9d45e6dcca191a.tar.zst | |
fix: Don't enqueue video tasks when video downlaod is disabled
| -rw-r--r-- | apps/workers/workers/crawlerWorker.ts | 18 |
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); |
