From d4f24182b46e83be7e68be3e3d35fe15d0d7f898 Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Tue, 23 May 2017 17:59:49 -0700 Subject: [PATCH] use the queue doctype in the worker by default allow the user to override the setting --- src/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index a9c17af..83400d9 100644 --- a/src/index.js +++ b/src/index.js @@ -54,7 +54,10 @@ export default class Esqueue extends events.EventEmitter { } registerWorker(type, workerFn, opts) { - const worker = new Worker(this, type, workerFn, opts); + const options = Object.assign({ + doctype: this.settings.doctype, + }, opts); + const worker = new Worker(this, type, workerFn, options); this._workers.push(worker); return worker; }