Fix typo in Worker Class name

It was mistakenly called Job.
This commit is contained in:
Jason Allen
2016-12-01 07:58:35 -08:00
committed by GitHub
parent 7836ae5b39
commit 3d34642de4

View File

@@ -16,7 +16,7 @@ function formatJobObject(job) {
}; };
} }
export default class Job extends events.EventEmitter { export default class Worker extends events.EventEmitter {
constructor(queue, type, workerFn, opts = {}) { constructor(queue, type, workerFn, opts = {}) {
if (typeof type !== 'string') throw new Error('Type must be a string'); if (typeof type !== 'string') throw new Error('Type must be a string');
if (typeof workerFn !== 'function') throw new Error('Worker must be a function'); if (typeof workerFn !== 'function') throw new Error('Worker must be a function');