Skip to content

Commit

Permalink
Emit event if the job has been started (for demonstration - the 'star…
Browse files Browse the repository at this point in the history
…ted' property needs to be written).
  • Loading branch information
bradvogel committed Oct 17, 2016
1 parent abd20ac commit 417ba9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ Queue.prototype.processStalledJob = function() {
return scripts.getStalledJob(this).then(function(job){
if (job) {
return _this.getJobFromId(job).then(function(job){
if (job.started) {
_this.emit('stalled', job);
}
return _this.processJob(job, true /* Renew the lock */);
});
}
Expand Down

0 comments on commit 417ba9d

Please sign in to comment.