refactor: fix workers.

This commit is contained in:
Christopher Jeffrey 2016-08-24 05:02:01 -07:00
parent 6105095379
commit 8c00722dda
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ if (typeof importScripts !== 'undefined') {
}; };
} else { } else {
env = process.env; env = process.env;
bcoin = require('./env'); bcoin = require('../env');
bcoin.set(env.BCOIN_WORKER_NETWORK); bcoin.set(env.BCOIN_WORKER_NETWORK);
bcoin.workers.listen(); bcoin.workers.listen();
} }

View File

@ -354,7 +354,7 @@ Worker.prototype._init = function _init() {
} else { } else {
cp = require('child_process'); cp = require('child_process');
this.child = cp.spawn(process.argv[0], [__dirname + '/../../worker.js'], { this.child = cp.spawn(process.argv[0], [__dirname + '/worker.js'], {
stdio: 'pipe', stdio: 'pipe',
env: utils.merge({}, process.env, penv) env: utils.merge({}, process.env, penv)
}); });