mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-06 01:46:04 +08:00
fix(crawl): failed behaviour
This commit is contained in:
parent
a9a3739883
commit
f395c5b008
@ -404,9 +404,9 @@ async function processJob(job: Job & { id: string }, token: string) {
|
|||||||
const jobIDs = await getCrawlJobs(job.data.crawl_id);
|
const jobIDs = await getCrawlJobs(job.data.crawl_id);
|
||||||
|
|
||||||
const jobs = (await getJobs(jobIDs)).sort((a, b) => a.timestamp - b.timestamp);
|
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 =
|
const jobStatus =
|
||||||
sc.cancelled || jobStatuses.some((x) => x === "failed")
|
sc.cancelled // || jobStatuses.some((x) => x === "failed")
|
||||||
? "failed"
|
? "failed"
|
||||||
: "completed";
|
: "completed";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user