Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Revert "fix(queue-worker): disable event listening"
Nicolas258e94c7e4ee
diff --git a/apps/api/src/services/queue-worker.ts b/apps/api/src/services/queue-worker.tsindex b6d4cc60c..bfcc7aca5 100644--- a/apps/api/src/services/queue-worker.ts+++ b/apps/api/src/services/queue-worker.ts@@ -1673,14 +1673,8 @@ app.listen(workerPort, () => {}}- // const scrapeQueueEvents = new QueueEvents(getScrapeQueue().name, {- // // Create new connection, as this connection requires blocking events- // // Reusing the existing connection will horribly mess everything up.- // connection: new IORedis(process.env.REDIS_URL!, {- // maxRetriesPerRequest: null,- // }),- // });- // scrapeQueueEvents.on("failed", failedListener);+ const scrapeQueueEvents = new QueueEvents(getScrapeQueue().name, { connection: redisConnection });+ scrapeQueueEvents.on("failed", failedListener);const conn = createRedisConnection();await Promise.all([@@ -1696,7 +1690,7 @@ app.listen(workerPort, () => {await new Promise((resolve) => setTimeout(resolve, 500));}- // await scrapeQueueEvents.close();+ await scrapeQueueEvents.close();console.log("All jobs finished. Worker out!");process.exit(0);})();\ No newline at end of file