mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
Merge pull request #761 from mendableai/fix/filter-status-unknown-jobs
[BUG] filters failed and unknown jobs now
This commit is contained in:
commit
ca51521625
|
@ -64,7 +64,7 @@ export async function crawlStatusController(req: RequestWithAuth<CrawlStatusPara
|
|||
// filter out failed jobs
|
||||
jobIDs = jobIDs.filter(id => !jobStatuses.some(status => status[0] === id && status[1] === "failed"));
|
||||
// filter the job statues
|
||||
jobStatuses = jobStatuses.filter(x => x[1] !== "failed");
|
||||
jobStatuses = jobStatuses.filter(x => x[1] !== "failed" && x[1] !== "unknown");
|
||||
const status: Exclude<CrawlStatusResponse, ErrorResponse>["status"] = sc.cancelled ? "cancelled" : jobStatuses.every(x => x[1] === "completed") ? "completed" : "scraping";
|
||||
const doneJobsLength = await getDoneJobsOrderedLength(req.params.jobId);
|
||||
const doneJobsOrder = await getDoneJobsOrdered(req.params.jobId, start, end ?? -1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user