diff --git a/batch/job_backend.js b/batch/job_backend.js index 7030a0ae..136f11f2 100644 --- a/batch/job_backend.js +++ b/batch/job_backend.js @@ -324,6 +324,7 @@ JobBackend.prototype.setFailed = function (job, error, index, callback) { callback = index; } else if (index || index === 0) { job.query[index].status = 'failed'; + job.query[index].failed_reason = error.message; redisParams = redisParams.concat('query', JSON.stringify(job.query)); }