diff options
| author | kamtschatka <simon.schatka@gmx.at> | 2024-10-28 02:51:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-28 01:51:00 +0000 |
| commit | 4a13c36da50f6b3171d817edebefe96ba85dc666 (patch) | |
| tree | 60ff553426493e7ae2460e73c3500a5525ba735c /apps/workers/index.ts | |
| parent | 3b7451f4d0727d597c0af0e602f0c74cf58999af (diff) | |
| download | karakeep-4a13c36da50f6b3171d817edebefe96ba85dc666.tar.zst | |
feature: Archive videos using yt-dlp. Fixes #215 (#525)
* Allow downloading more content from a webpage and index it #215
Added a worker that allows downloading videos depending on the environment variables
refactored the code a bit
added new video asset
updated documentation
* Some tweaks
* Drop the dependency on the yt-dlp wrapper
* Update openapi specs
* Dont log an error when the url is not supported
* Better handle supported websites that dont download anything
---------
Co-authored-by: Mohamed Bassem <me@mbassem.com>
Diffstat (limited to 'apps/workers/index.ts')
| -rw-r--r-- | apps/workers/index.ts | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/workers/index.ts b/apps/workers/index.ts index f9a05e59..3b5896e4 100644 --- a/apps/workers/index.ts +++ b/apps/workers/index.ts @@ -10,30 +10,39 @@ import { CrawlerWorker } from "./crawlerWorker"; import { shutdownPromise } from "./exit"; import { OpenAiWorker } from "./openaiWorker"; import { SearchIndexingWorker } from "./searchWorker"; +import { VideoWorker } from "./videoWorker"; async function main() { logger.info(`Workers version: ${serverConfig.serverVersion ?? "not set"}`); runQueueDBMigrations(); - const [crawler, openai, search, tidyAssets] = [ + const [crawler, openai, search, tidyAssets, video] = [ await CrawlerWorker.build(), OpenAiWorker.build(), SearchIndexingWorker.build(), TidyAssetsWorker.build(), + VideoWorker.build(), ]; await Promise.any([ - Promise.all([crawler.run(), openai.run(), search.run(), tidyAssets.run()]), + Promise.all([ + crawler.run(), + openai.run(), + search.run(), + tidyAssets.run(), + video.run(), + ]), shutdownPromise, ]); logger.info( - "Shutting down crawler, openai, tidyAssets and search workers ...", + "Shutting down crawler, openai, tidyAssets, video and search workers ...", ); crawler.stop(); openai.stop(); search.stop(); tidyAssets.stop(); + video.stop(); } main(); |
