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(crawl): failed behaviour
Gergő Móriczf395c5b0084f
diff --git a/apps/api/src/services/queue-worker.ts b/apps/api/src/services/queue-worker.tsindex c75acd322..3d5b3e0e2 100644--- a/apps/api/src/services/queue-worker.ts+++ b/apps/api/src/services/queue-worker.ts@@ -404,9 +404,9 @@ async function processJob(job: Job & { id: string }, token: string) {const jobIDs = await getCrawlJobs(job.data.crawl_id);const jobs = (await getJobs(jobIDs)).sort((a, b) => a.timestamp - b.timestamp);- const jobStatuses = await Promise.all(jobs.map((x) => x.getState()));+ // const jobStatuses = await Promise.all(jobs.map((x) => x.getState()));const jobStatus =- sc.cancelled || jobStatuses.some((x) => x === "failed")+ sc.cancelled // || jobStatuses.some((x) => x === "failed")? "failed": "completed";