add completed time and status to failed jobs
with tests
This commit is contained in:
@@ -132,7 +132,10 @@ export default class Job extends events.EventEmitter {
|
||||
throw err;
|
||||
});
|
||||
}, (err) => {
|
||||
const completedTime = moment().toISOString();
|
||||
const doc = {
|
||||
status: jobStatuses.JOB_STATUS_FAILED,
|
||||
completed_at: completedTime,
|
||||
output: {
|
||||
content_type: false,
|
||||
content: err.toString()
|
||||
|
||||
Reference in New Issue
Block a user