From 80bb8a108f29331cdb2f2695f6801beee104dc89 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Thu, 8 Feb 2024 15:14:23 +0000 Subject: [refactor] Move the different packages to the package subdir --- shared/queues.ts | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 shared/queues.ts (limited to 'shared/queues.ts') diff --git a/shared/queues.ts b/shared/queues.ts deleted file mode 100644 index a607131d..00000000 --- a/shared/queues.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Queue } from "bullmq"; -import { z } from "zod"; - -export const queueConnectionDetails = { - host: process.env.REDIS_HOST || "localhost", - port: parseInt(process.env.REDIS_PORT || "6379"), -}; - -// Link Crawler -export const zCrawlLinkRequestSchema = z.object({ - linkId: z.string(), - url: z.string().url(), -}); -export type ZCrawlLinkRequest = z.infer; - -export const LinkCrawlerQueue = new Queue( - "link_crawler_queue", - { connection: queueConnectionDetails }, -); - -// OpenAI Worker -export const zOpenAIRequestSchema = z.object({ - linkId: z.string(), -}); -export type ZOpenAIRequest = z.infer; - -export const OpenAIQueue = new Queue("openai_queue", { - connection: queueConnectionDetails, -}); -- cgit v1.2.3-70-g09d2