mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-08 11:38:59 +08:00
fix(crawl-status): improve finished checking
This commit is contained in:
parent
e6531278f6
commit
078c0679aa
@ -13,6 +13,7 @@ import {
|
||||
getDoneJobsOrderedLength,
|
||||
getThrottledJobs,
|
||||
isCrawlFinished,
|
||||
isCrawlFinishedLocked,
|
||||
} from "../../lib/crawl-redis";
|
||||
import { getScrapeQueue } from "../../services/queue-service";
|
||||
import {
|
||||
@ -117,7 +118,7 @@ export async function crawlStatusController(
|
||||
sc.cancelled
|
||||
? "cancelled"
|
||||
: validJobStatuses.every((x) => x[1] === "completed") &&
|
||||
await isCrawlFinished(req.params.jobId)
|
||||
(await isCrawlFinishedLocked(req.params.jobId) || await isCrawlFinished(req.params.jobId))
|
||||
? "completed"
|
||||
: "scraping";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user