mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-04 07:20:38 +08:00
fix(crawl): make request 0 of crawl jobs higher priority
This commit is contained in:
parent
f4466f6bb0
commit
2ca1017fc3
@ -139,6 +139,8 @@ export async function crawlController(req: Request, res: Response) {
|
||||
pageOptions: pageOptions,
|
||||
origin: req.body.origin ?? defaultOrigin,
|
||||
crawl_id: id,
|
||||
}, {
|
||||
priority: 1, // prioritize request 0 of crawl jobs same as scrape jobs
|
||||
});
|
||||
await addCrawlJob(id, job.id);
|
||||
}
|
||||
|
@ -9,9 +9,9 @@ export async function addScrapeJob(
|
||||
jobId: string = uuidv4(),
|
||||
): Promise<Job> {
|
||||
return await getScrapeQueue().add(jobId, webScraperOptions, {
|
||||
priority: webScraperOptions.crawl_id ? 2 : 1,
|
||||
...options,
|
||||
jobId,
|
||||
priority: webScraperOptions.crawl_id ? 2 : 1,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user