mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-05 20:16:03 +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
|
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
|
### Crawl Website
|
||||||
# @name crawl
|
# @name crawl
|
||||||
POST {{baseUrl}}/v1/map HTTP/1.1
|
POST {{baseUrl}}/v1/crawl HTTP/1.1
|
||||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"url": "https://emelitastes.lausd.org"
|
"url": "https://firecrawl.dev"
|
||||||
}
|
}
|
||||||
|
|
||||||
### Check Crawl Status
|
### Check Crawl Status
|
||||||
|
@ -12,6 +12,7 @@ import {
|
|||||||
getDoneJobsOrdered,
|
getDoneJobsOrdered,
|
||||||
getDoneJobsOrderedLength,
|
getDoneJobsOrderedLength,
|
||||||
getThrottledJobs,
|
getThrottledJobs,
|
||||||
|
isCrawlFinished,
|
||||||
} from "../../lib/crawl-redis";
|
} from "../../lib/crawl-redis";
|
||||||
import { getScrapeQueue } from "../../services/queue-service";
|
import { getScrapeQueue } from "../../services/queue-service";
|
||||||
import {
|
import {
|
||||||
@ -116,7 +117,7 @@ export async function crawlStatusController(
|
|||||||
sc.cancelled
|
sc.cancelled
|
||||||
? "cancelled"
|
? "cancelled"
|
||||||
: validJobStatuses.every((x) => x[1] === "completed") &&
|
: validJobStatuses.every((x) => x[1] === "completed") &&
|
||||||
validJobStatuses.length > 0
|
await isCrawlFinished(req.params.jobId)
|
||||||
? "completed"
|
? "completed"
|
||||||
: "scraping";
|
: "scraping";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user