mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-18 07:45:54 +08:00
fix(queue-worker/crawl): only report successful page count in num_docs (#1179)
This commit is contained in:
parent
584221a106
commit
73e7884df4
@ -29,6 +29,7 @@ import {
|
||||
getCrawl,
|
||||
getCrawlJobCount,
|
||||
getCrawlJobs,
|
||||
getDoneJobsOrderedLength,
|
||||
lockURL,
|
||||
lockURLs,
|
||||
lockURLsIndividually,
|
||||
@ -185,7 +186,7 @@ async function finishCrawlIfNeeded(job: Job & { id: string }, sc: StoredCrawl) {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
const num_docs = await getCrawlJobCount(job.data.crawl_id);
|
||||
const num_docs = await getDoneJobsOrderedLength(job.data.crawl_id);
|
||||
const jobStatus = sc.cancelled ? "failed" : "completed";
|
||||
|
||||
await logJob(
|
||||
|
Loading…
x
Reference in New Issue
Block a user