Skip to content

Commit

Permalink
fix: emit a job.errored event when processing job and encountering an…
Browse files Browse the repository at this point in the history
… error

This allows the server to save the job state
  • Loading branch information
knownasilya committed Jul 4, 2020
1 parent 6679280 commit 65b07d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ Runner.prototype = {
debug(
`[runner:${self.id}] Job done with error. Project: ${job.project.name} Job ID: ${job._id}`
);
self.emitter.emit('job.errored', jobdata);

return next(err);
}

Expand Down

0 comments on commit 65b07d7

Please sign in to comment.