Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Set job data before setting its state

Since setting state to inactive signals worker that there is a new job
ready we ensure that workers get the job after it's data has been set
  • Loading branch information...
commit 4c6d7626761f678207a1c7a2390fd4f0d0e2d74e 1 parent edbd680
@davibe davibe authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/queue/job.js
6 lib/queue/job.js
@@ -566,12 +566,12 @@ Job.prototype.update = function(fn){
// priority
this.set('priority', this._priority);
- // state
- this.state(this._state);
// data
this.set('data', json, fn);
+ // state
+ this.state(this._state);
// search data
Please sign in to comment.
Something went wrong with that request. Please try again.