allow client to be passed with registering worker

This commit is contained in:
2016-06-06 14:50:24 -07:00
parent e0605796a1
commit 57c1bd1819

View File

@@ -17,7 +17,7 @@ export default class Job extends events.EventEmitter {
this.id = puid.generate();
this.queue = queue;
this.client = this.queue.client;
this.client = opts.client || this.queue.client;
this.jobtype = type;
this.workerFn = workerFn;
this.checkInterval = opts.interval || 1500;