Skip to content

Commit

Permalink
in jobs, 'this' is now the worker itself'
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Tahler committed Feb 5, 2014
1 parent ac603ee commit ecc340f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ worker.prototype.perform = function(job, callback) {
}else{
var args = [job.args];
}
cb.apply(null, [].slice.call(args).concat([function(err, result) {
cb.apply(self, [].slice.call(args).concat([function(err, result) {
self.runPlugins('after_perform', job["class"], self.queue, self.jobs[job["class"]], job.args, function(err, toRun){
self.completeJob(err, result, callback);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Evan Tahler <[email protected]>",
"name": "node-resque",
"description": "an opinionated implementation of resque in node",
"version": "0.3.4",
"version": "0.3.5",
"homepage": "http://github.com/taskrabbit/node-resque",
"repository": {
"type": "git",
Expand Down

0 comments on commit ecc340f

Please sign in to comment.