Do not return error if job could not added to work-in-progress list

This commit is contained in:
Daniel García Aubert 2016-11-07 12:04:47 +01:00
parent c8b149865e
commit 4a2b7258be

View File

@ -89,15 +89,13 @@ Batch.prototype._processWorkInProgressJob = function (user, jobId, callback) {
self.setWorkInProgressJob(user, jobId, function (errSet) {
if (errSet) {
return callback(new Error('Could not add job to work-in-progress list. Reason: ' + errSet.message));
debug(new Error('Could not add job to work-in-progress list. Reason: ' + errSet.message));
}
self.jobRunner.run(jobId, function (err, job) {
self.clearWorkInProgressJob(user, jobId, function (errClear) {
if (errClear) {
return callback(
new Error('Could not clear job from work-in-progress list. Reason: ' + errClear.message)
);
debug(new Error('Could not clear job from work-in-progress list. Reason: ' + errClear.message));
}
return callback(err, job);