Skip to content

Commit

Permalink
fix(job-processor): emit error when db query fails
Browse files Browse the repository at this point in the history
  • Loading branch information
simllll committed Oct 23, 2020
1 parent 88caf6a commit 9bfabd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JobProcessor.ts
Expand Up @@ -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);
Expand Down

0 comments on commit 9bfabd3

Please sign in to comment.