mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-13 20:35:56 +08:00
fix(v0/crawl): force kickoff
This commit is contained in:
parent
2cf7a4f57a
commit
ae0d705f5d
@ -18,6 +18,7 @@ import {
|
||||
addCrawlJob,
|
||||
addCrawlJobs,
|
||||
crawlToCrawler,
|
||||
finishCrawlKickoff,
|
||||
lockURL,
|
||||
lockURLs,
|
||||
saveCrawl,
|
||||
@ -177,6 +178,8 @@ export async function crawlController(req: Request, res: Response) {
|
||||
|
||||
await saveCrawl(id, sc);
|
||||
|
||||
await finishCrawlKickoff(id);
|
||||
|
||||
const sitemap = sc.crawlerOptions.ignoreSitemap
|
||||
? 0
|
||||
: await crawler.tryGetSitemap(async (urls) => {
|
||||
@ -224,7 +227,7 @@ export async function crawlController(req: Request, res: Response) {
|
||||
await addScrapeJob(job.data as any, {}, job.opts.jobId);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (sitemap === 0) {
|
||||
await lockURL(id, sc, url);
|
||||
|
||||
|
@ -7,6 +7,7 @@ import { logger } from "../../../src/lib/logger";
|
||||
import {
|
||||
addCrawlJob,
|
||||
crawlToCrawler,
|
||||
finishCrawlKickoff,
|
||||
lockURL,
|
||||
saveCrawl,
|
||||
StoredCrawl,
|
||||
@ -112,6 +113,8 @@ export async function crawlPreviewController(req: Request, res: Response) {
|
||||
|
||||
const crawler = crawlToCrawler(id, sc);
|
||||
|
||||
await finishCrawlKickoff(id);
|
||||
|
||||
const sitemap = sc.crawlerOptions?.ignoreSitemap
|
||||
? 0
|
||||
: await crawler.tryGetSitemap(async (urls) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user