better fix for the worker doctype
use the queue's doctype if one is not provided. also adds the option to the readme
This commit is contained in:
@@ -30,7 +30,7 @@ export default class Worker extends events.EventEmitter {
|
||||
this.workerFn = workerFn;
|
||||
this.checkInterval = opts.interval || 1500;
|
||||
this.checkSize = opts.size || 10;
|
||||
this.doctype = opts.doctype || constants.DEFAULT_SETTING_DOCTYPE;
|
||||
this.doctype = opts.doctype || this.queue.doctype || constants.DEFAULT_SETTING_DOCTYPE;
|
||||
|
||||
this.debug = (...msg) => debug(...msg, `id: ${this.id}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user