Skip to content

Commit

Permalink
fix worker path
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Oct 1, 2017
1 parent 92d3006 commit 8c45aa4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/core.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-case-declarations, no-restricted-modules */

const os = require('os');
const path = require('path');
const cluster = require('cluster');
const EventEmitter = require('events').EventEmitter;
const oe = require('obj-ease');
Expand Down Expand Up @@ -34,15 +35,15 @@ class Core extends EventEmitter {
timeEnd = () => {};
}

require('./backend/' + this.backend + '.js')(this);
require(path.join(__dirname, 'backend', this.backend + '.js'))(this);

this.workers = [];

/* istanbul ignore next */
this.numWorkers = config.workers || os.cpus().length;

cluster.setupMaster({
exec: 'lib/worker.js',
exec: path.join(__dirname, 'worker.js'),
args: [],
silent: false
});
Expand Down

0 comments on commit 8c45aa4

Please sign in to comment.