Clear job from WIP while draining

This commit is contained in:
Daniel García Aubert 2019-04-03 18:49:11 +02:00
parent e573daddf8
commit 7f6f91fc15

View File

@ -185,7 +185,13 @@ Batch.prototype._drainJob = function (user, callback) {
return callback(err);
}
self.jobQueue.enqueueFirst(user, job_id, callback);
self.clearWorkInProgressJob(user, jobId, function (err) {
if (err) {
debug(new Error('Could not clear job from work-in-progress list. Reason: ' + errClear.message));
}
self.jobQueue.enqueueFirst(user, job_id, callback);
});
});
};