mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
Update crawl-cancel.ts
This commit is contained in:
parent
d2de01d342
commit
ce804d3c20
|
@ -50,6 +50,8 @@ export async function crawlCancelController(req: Request, res: Response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
await getWebScraperQueue().client.del(job.lockKey());
|
||||||
|
await job.takeLock();
|
||||||
await job.moveToFailed(Error("Job cancelled by user"), true);
|
await job.moveToFailed(Error("Job cancelled by user"), true);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user