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:
2017-05-23 18:04:01 -07:00
parent d4f24182b4
commit 32fb6a92f5
3 changed files with 3 additions and 5 deletions

View File

@@ -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}`);