mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 21:36:04 +08:00
fix: try-catch job removal
This commit is contained in:
parent
69d724714f
commit
0d3e09e798
@ -141,10 +141,14 @@ if (cluster.isMaster) {
|
||||
console.log(" Removing", jobs.length, "jobs...");
|
||||
|
||||
await Promise.all(jobs.map(async x => {
|
||||
await wsq.client.del(await x.lockKey());
|
||||
await x.takeLock();
|
||||
await x.moveToFailed({ message: "interrupted" });
|
||||
await x.remove();
|
||||
try {
|
||||
await wsq.client.del(await x.lockKey());
|
||||
await x.takeLock();
|
||||
await x.moveToFailed({ message: "interrupted" });
|
||||
await x.remove();
|
||||
} catch (e) {
|
||||
console.warn("Failed to remove job", x.id, e);
|
||||
}
|
||||
}));
|
||||
|
||||
console.log(" Re-adding", jobs.length, "jobs...");
|
||||
|
Loading…
x
Reference in New Issue
Block a user