From ecc340f44fbcf2bcff3484cfbb67ac7cc566b988 Mon Sep 17 00:00:00 2001 From: Evan Tahler Date: Tue, 4 Feb 2014 16:44:52 -0800 Subject: [PATCH] in jobs, 'this' is now the worker itself' --- lib/worker.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/worker.js b/lib/worker.js index 52077e2b..f1497c95 100644 --- a/lib/worker.js +++ b/lib/worker.js @@ -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); }); diff --git a/package.json b/package.json index fdb194be..091621c5 100755 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Evan Tahler ", "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",