fix(queue-worker, queue-jobs): logic fixes
This commit is contained in:
@@ -63,8 +63,11 @@ export function waitForJob(jobId: string, timeout: number) {
|
||||
resolve((await getScrapeQueue().getJob(jobId)).returnvalue);
|
||||
} else if (state === "failed") {
|
||||
// console.log("failed", (await getScrapeQueue().getJob(jobId)).failedReason);
|
||||
clearInterval(int);
|
||||
reject((await getScrapeQueue().getJob(jobId)).failedReason);
|
||||
const job = await getScrapeQueue().getJob(jobId);
|
||||
if (job.failedReason !== "Concurrency limit hit") {
|
||||
clearInterval(int);
|
||||
reject(job.failedReason);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
|
||||
Reference in New Issue
Block a user