use the queue doctype in the worker by default
allow the user to override the setting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user