aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workers/index.ts
blob: 5b6b62d5bd81dbfa5edc2dacac6b93ff74084451 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import "dotenv/config";
import { CrawlerWorker } from "./crawlerWorker";
import { OpenAiWorker } from "./openaiWorker";
import { SearchIndexingWorker } from "./searchWorker";

async function main() {
  const [crawler, openai, search] = [
    await CrawlerWorker.build(),
    await OpenAiWorker.build(),
    await SearchIndexingWorker.build(),
  ];

  await Promise.all([crawler.run(), openai.run(), search.run()]);
}

main();