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) { self.setWorkInProgressJob(user, jobId, function (errSet) {
if (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.jobRunner.run(jobId, function (err, job) {
self.clearWorkInProgressJob(user, jobId, function (errClear) { self.clearWorkInProgressJob(user, jobId, function (errClear) {
if (errClear) { if (errClear) {
return callback( debug(new Error('Could not clear job from work-in-progress list. Reason: ' + errClear.message));
new Error('Could not clear job from work-in-progress list. Reason: ' + errClear.message)
);
} }
return callback(err, job); return callback(err, job);