From 06dd021aaef3f1e882ca0f3f7f7fb5834ae174fd Mon Sep 17 00:00:00 2001 From: Brad Vogel Date: Tue, 1 Mar 2016 14:42:11 -0800 Subject: [PATCH] Revert "Emit a 'stalled' event." --- README.md | 4 ---- lib/queue.js | 1 - test/test_queue.js | 4 ---- 3 files changed, 9 deletions(-) diff --git a/README.md b/README.md index 8a1dee882..d8a75bc7d 100644 --- a/README.md +++ b/README.md @@ -151,10 +151,6 @@ A queue emits also some useful events: // Job started // You can use jobPromise.cancel() to abort this job. }) -.on('stalled', function(job){ - // The job was considered stalled (i.e. its lock was not renewed in LOCK_RENEW_TIME). - // Useful for debugging job workers that crash or pause the event loop. -}) .on('progress', function(job, progress){ // Job progress updated! }) diff --git a/lib/queue.js b/lib/queue.js index 17cad932c..c95603bdd 100644 --- a/lib/queue.js +++ b/lib/queue.js @@ -549,7 +549,6 @@ Queue.prototype.processStalledJob = function(job){ var key = _this.toKey('completed'); return _this.client.sismemberAsync(key, job.jobId).then(function(isMember){ if(!isMember){ - _this.emit('stalled', job); return _this.processJob(job); } }); diff --git a/test/test_queue.js b/test/test_queue.js index efea336c1..f2fcc8d2f 100644 --- a/test/test_queue.js +++ b/test/test_queue.js @@ -416,16 +416,12 @@ describe('Queue', function () { }); setTimeout(function(){ - var stalledCallback = sandbox.spy(); - return queueStalled.disconnect().then(function(){ var queue2 = new Queue('test queue stalled', 6379, '127.0.0.1'); var doneAfterFour = _.after(4, function () { - expect(stalledCallback.calledOnce).to.be(true); done(); }); queue2.on('completed', doneAfterFour); - queue2.on('stalled', stalledCallback); queue2.process(function (job, jobDone2) { jobDone2();