Skip to content

Commit

Permalink
Allow paaing Configuration instance to WorkerPool.configure
Browse files Browse the repository at this point in the history
  • Loading branch information
mcheshkov committed Jul 18, 2018
1 parent 2a02f11 commit a2f24ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/worker-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ class WorkerPool extends EventEmitterEx {
}

configure(config) {
this.config = new Configuration(config);
if (! (config instanceof Configuration)) {
config = new Configuration(config);
}
this.config = config;

const // WorkerWrapper options
forkTimeout = this.config.get('control.forkTimeout'),
Expand Down

0 comments on commit a2f24ee

Please sign in to comment.