aboutsummaryrefslogtreecommitdiffstats
path: root/packages/workers/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/workers/index.ts')
-rw-r--r--packages/workers/index.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/workers/index.ts b/packages/workers/index.ts
index bf092953..d16c42eb 100644
--- a/packages/workers/index.ts
+++ b/packages/workers/index.ts
@@ -1,5 +1,7 @@
import { Worker } from "bullmq";
+import dotenv from "dotenv";
+
import {
LinkCrawlerQueue,
OpenAIQueue,
@@ -55,4 +57,9 @@ function openaiWorker() {
return worker;
}
-await Promise.all([crawlerWorker().run(), openaiWorker().run()]);
+async function main() {
+ dotenv.config();
+ await Promise.all([crawlerWorker().run(), openaiWorker().run()]);
+}
+
+main();