We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d131f9 commit 13d679aCopy full SHA for 13d679a
src/Queue.ts
@@ -327,7 +327,6 @@ export class Queue {
327
328
this.jobStore.removeJob(rawJob);
329
} catch (error) {
330
- worker.triggerFailure(job, error);
331
const { attempts } = rawJob;
332
// tslint:disable-next-line: prefer-const
333
let { errors, failedAttempts } = JSON.parse(rawJob.metaData);
@@ -337,6 +336,7 @@ export class Queue {
337
336
failed = new Date().toISOString();
338
}
339
const metaData = JSON.stringify({ errors: [...errors, error], failedAttempts });
+ worker.triggerFailure({ ...job, metaData, failed }, error);
340
this.jobStore.updateJob({ ...rawJob, ...{ active: FALSE, metaData, failed } });
341
} finally {
342
delete this.runningJobPromises[job.id]
0 commit comments