mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 07:49:00 +08:00
fix(kickoff): mark as finished if it errors out
This commit is contained in:
parent
5992c57158
commit
dcd3d6d98d
@ -682,6 +682,11 @@ async function processKickoffJob(job: Job & { id: string }, token: string) {
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
logger.error("An error occurred!", { error });
|
||||
await finishCrawlKickoff(job.data.crawl_id);
|
||||
const sc = (await getCrawl(job.data.crawl_id)) as StoredCrawl;
|
||||
if (sc) {
|
||||
await finishCrawlIfNeeded(job, sc);
|
||||
}
|
||||
return { success: false, error };
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user