From 6f547e6ef16210d9538b6e7f4130b1ca8dfeefa4 Mon Sep 17 00:00:00 2001 From: Rafael Vidaurre Date: Tue, 21 Jul 2015 17:37:24 -0300 Subject: [PATCH] Add fail call to prevent done from tirggering exception --- job.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/job.js b/job.js index aef9077..aad25fd 100644 --- a/job.js +++ b/job.js @@ -324,7 +324,11 @@ Job.prototype.__runTask = function (taskSpec) { if (nextTaskSpec) { taskRunning.then(function () { _this.__runTask(nextTaskSpec); - }).done(); + }) + .fail(function () { + // Do nothing, this rejection is being handled in `__runExecutionBlock`'s Q.all call + }) + .done(); } _this.__events.emit('task:start', thisTask);