rename the timeout error type
This commit is contained in:
@@ -3,7 +3,7 @@ import typedError from 'error/typed';
|
||||
const errors = {};
|
||||
|
||||
errors.WorkerTimeoutError = typedError({
|
||||
type: 'WorkerTimeout',
|
||||
type: 'WorkerTimeoutError',
|
||||
message: 'worker timed out, timeout={timeout}',
|
||||
timeout: null,
|
||||
jobId: null
|
||||
|
||||
@@ -174,7 +174,7 @@ export default class Job extends events.EventEmitter {
|
||||
});
|
||||
}, (jobErr) => {
|
||||
// job execution failed
|
||||
if (jobErr.type === 'WorkerTimeout') {
|
||||
if (jobErr.type === 'WorkerTimeoutError') {
|
||||
this.debug(`Timeout on job ${job._id}`);
|
||||
this.emit('job_timeout', jobErr);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user