mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-05 14:40:37 +08:00
fix(v1/crawl-status): fix stuck on 0 jobs
This commit is contained in:
parent
ce2f6ff884
commit
dde3aebac4
@ -9,19 +9,17 @@ Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"url":"https://opencorporates.com/companies/us_tn/001260776/"
|
||||
"url":"https://firecrawl.dev"
|
||||
}
|
||||
|
||||
### http://ibtikar.net.sa bugado. redirect
|
||||
### https://bansko.bg/bg -> webhooks
|
||||
### Crawl Website
|
||||
# @name crawl
|
||||
POST {{baseUrl}}/v1/map HTTP/1.1
|
||||
POST {{baseUrl}}/v1/crawl HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"url": "https://emelitastes.lausd.org"
|
||||
{
|
||||
"url": "https://firecrawl.dev"
|
||||
}
|
||||
|
||||
### Check Crawl Status
|
||||
|
@ -12,6 +12,7 @@ import {
|
||||
getDoneJobsOrdered,
|
||||
getDoneJobsOrderedLength,
|
||||
getThrottledJobs,
|
||||
isCrawlFinished,
|
||||
} from "../../lib/crawl-redis";
|
||||
import { getScrapeQueue } from "../../services/queue-service";
|
||||
import {
|
||||
@ -116,7 +117,7 @@ export async function crawlStatusController(
|
||||
sc.cancelled
|
||||
? "cancelled"
|
||||
: validJobStatuses.every((x) => x[1] === "completed") &&
|
||||
validJobStatuses.length > 0
|
||||
await isCrawlFinished(req.params.jobId)
|
||||
? "completed"
|
||||
: "scraping";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user