feat: continue other job execution on fail

This commit is contained in:
Rohit
2025-08-05 01:22:51 +05:30
parent 89c7184efc
commit 47fc16806d

View File

@@ -41,6 +41,10 @@ export default class Concurrency {
job().then(() => { job().then(() => {
// console.debug("Job finished, running the next waiting job..."); // console.debug("Job finished, running the next waiting job...");
this.runNextJob(); this.runNextJob();
}).catch((error) => {
console.error(`Job failed with error: ${error.message}`);
// Continue processing other jobs even if one fails
this.runNextJob();
}); });
} else { } else {
// console.debug("No waiting job found!"); // console.debug("No waiting job found!");