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
fix(queue-worker): disable event listening
Gergő Móricz63c42c697f46
diff --git a/apps/api/src/services/queue-worker.ts b/apps/api/src/services/queue-worker.tsindex ae692f203..d23dff6fd 100644--- a/apps/api/src/services/queue-worker.ts+++ b/apps/api/src/services/queue-worker.ts@@ -1667,8 +1667,14 @@ app.listen(workerPort, () => {}}- const scrapeQueueEvents = new QueueEvents(getScrapeQueue().name, { connection: redisConnection });- scrapeQueueEvents.on("failed", failedListener);+ // 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);await Promise.all([workerFun(getScrapeQueue(), processJobInternal),@@ -1683,7 +1689,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