Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Update crawl-cancel.ts

Nicolasce804d3c2042
diff --git a/apps/api/src/controllers/crawl-cancel.ts b/apps/api/src/controllers/crawl-cancel.ts
index 160824ffb..8a2c91f90 100644
--- a/apps/api/src/controllers/crawl-cancel.ts
+++ b/apps/api/src/controllers/crawl-cancel.ts
@@ -50,6 +50,8 @@ export async function crawlCancelController(req: Request, res: Response) {
}
try {
+ await getWebScraperQueue().client.del(job.lockKey());
+ await job.takeLock();
await job.moveToFailed(Error("Job cancelled by user"), true);
} catch (error) {
console.error(error);