aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workers/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workers/index.ts')
-rw-r--r--apps/workers/index.ts34
1 files changed, 23 insertions, 11 deletions
diff --git a/apps/workers/index.ts b/apps/workers/index.ts
index c2d3f28a..3997b423 100644
--- a/apps/workers/index.ts
+++ b/apps/workers/index.ts
@@ -13,21 +13,31 @@ import { shutdownPromise } from "./exit";
import { OpenAiWorker } from "./openaiWorker";
import { SearchIndexingWorker } from "./searchWorker";
import { VideoWorker } from "./videoWorker";
+import { WebhookWorker } from "./webhookWorker";
async function main() {
logger.info(`Workers version: ${serverConfig.serverVersion ?? "not set"}`);
runQueueDBMigrations();
- const [crawler, openai, search, tidyAssets, video, feed, assetPreprocessing] =
- [
- await CrawlerWorker.build(),
- OpenAiWorker.build(),
- SearchIndexingWorker.build(),
- TidyAssetsWorker.build(),
- VideoWorker.build(),
- FeedWorker.build(),
- AssetPreprocessingWorker.build(),
- ];
+ const [
+ crawler,
+ openai,
+ search,
+ tidyAssets,
+ video,
+ feed,
+ assetPreprocessing,
+ webhook,
+ ] = [
+ await CrawlerWorker.build(),
+ OpenAiWorker.build(),
+ SearchIndexingWorker.build(),
+ TidyAssetsWorker.build(),
+ VideoWorker.build(),
+ FeedWorker.build(),
+ AssetPreprocessingWorker.build(),
+ WebhookWorker.build(),
+ ];
FeedRefreshingWorker.start();
await Promise.any([
@@ -39,11 +49,12 @@ async function main() {
video.run(),
feed.run(),
assetPreprocessing.run(),
+ webhook.run(),
]),
shutdownPromise,
]);
logger.info(
- "Shutting down crawler, openai, tidyAssets, video, feed, assetPreprocessing and search workers ...",
+ "Shutting down crawler, openai, tidyAssets, video, feed, assetPreprocessing, webhook and search workers ...",
);
FeedRefreshingWorker.stop();
@@ -54,6 +65,7 @@ async function main() {
video.stop();
feed.stop();
assetPreprocessing.stop();
+ webhook.stop();
}
main();