Skip to content

Commit

Permalink
Merge pull request #82 from parapety/master
Browse files Browse the repository at this point in the history
Fix: enquening new job when previosu one was locked
  • Loading branch information
evantahler committed Sep 2, 2015
2 parents 30f1ecc + 898f87d commit a03400a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/plugins/queueLock.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ queueLock.prototype.before_enqueue = function(callback){
callback(null, false);
}else{
self.worker.connection.redis.set(key, timeout, function(err){
self.worker.connection.redis.get(key, function(err, redisTimeout){
redisTimeout = parseInt(redisTimeout);
callback(null, now > redisTimeout);
});
callback(err, !err);
});
}
});
Expand Down

0 comments on commit a03400a

Please sign in to comment.