rename the timeout error type

This commit is contained in:
2016-06-28 17:46:06 -07:00
parent db1d282da2
commit df03738b9a
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ import typedError from 'error/typed';
const errors = {}; const errors = {};
errors.WorkerTimeoutError = typedError({ errors.WorkerTimeoutError = typedError({
type: 'WorkerTimeout', type: 'WorkerTimeoutError',
message: 'worker timed out, timeout={timeout}', message: 'worker timed out, timeout={timeout}',
timeout: null, timeout: null,
jobId: null jobId: null

View File

@@ -174,7 +174,7 @@ export default class Job extends events.EventEmitter {
}); });
}, (jobErr) => { }, (jobErr) => {
// job execution failed // job execution failed
if (jobErr.type === 'WorkerTimeout') { if (jobErr.type === 'WorkerTimeoutError') {
this.debug(`Timeout on job ${job._id}`); this.debug(`Timeout on job ${job._id}`);
this.emit('job_timeout', jobErr); this.emit('job_timeout', jobErr);
return; return;