swollow errors saving job output, include error in debugging output
This commit is contained in:
@@ -148,7 +148,8 @@ export default class Job extends events.EventEmitter {
|
|||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
if (err.statusCode === 409) return false;
|
if (err.statusCode === 409) return false;
|
||||||
throw err;
|
this.debug(`Failure saving job output ${job._id}`, err);
|
||||||
|
this.emit('job_error', err);
|
||||||
});
|
});
|
||||||
}, (jobErr) => {
|
}, (jobErr) => {
|
||||||
// job execution failed
|
// job execution failed
|
||||||
@@ -158,7 +159,7 @@ export default class Job extends events.EventEmitter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.debug(`Failure occurred on job ${job._id}`);
|
this.debug(`Failure occurred on job ${job._id}`, jobErr);
|
||||||
this.emit('job_error', jobErr);
|
this.emit('job_error', jobErr);
|
||||||
return this._failJob(job, jobErr.toString());
|
return this._failJob(job, jobErr.toString());
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user