rename the timeout error type
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user