diff --git a/src/JobProcessor.ts b/src/JobProcessor.ts index 527ebe2..e3fc449 100644 --- a/src/JobProcessor.ts +++ b/src/JobProcessor.ts @@ -510,7 +510,7 @@ export class JobProcessor { job.attrs._id, err ); - job.agenda.emit('error', err); + this.agenda.emit('error', err); } finally { // Remove the job from the running queue let runningJobIndex = this.runningJobs.indexOf(job);