Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Bugfix/fix cp debug port conflict #1666

Merged
merged 2 commits into from
Jan 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/workers/dateRangeScan/child.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ipc.on('start', config => {
scan(
(err, ranges, reader) => {
reader.close();
ipc.send('ranges', ranges)
ipc.send('ranges', ranges);
process.exit(0);
}
);
Expand Down
11 changes: 8 additions & 3 deletions core/workers/dateRangeScan/parent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
var ForkTask = require('relieve').tasks.ForkTask
var fork = require('child_process').fork
var ForkTask = require('relieve').tasks.ForkTask;
var fork = require('child_process').fork;

module.exports = function(config, done) {
var debug = typeof v8debug === 'object';
if (debug) {
process.execArgv = [];
}

task = new ForkTask(fork(__dirname + '/child'));

task.send('start', config);
Expand All @@ -13,4 +18,4 @@ module.exports = function(config, done) {
if(code !== 0)
done('ERROR, unable to scan dateranges, please check the console.');
});
}
}
7 changes: 6 additions & 1 deletion core/workers/loadCandles/parent.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ const fork = require('child_process').fork;
const _ = require('lodash');

module.exports = (config, callback) => {
var debug = typeof v8debug === 'object';
if (debug) {
process.execArgv = [];
}

const child = fork(__dirname + '/child');

const message = {
Expand All @@ -58,4 +63,4 @@ module.exports = (config, callback) => {
if(code !== 0)
done('ERROR, unable to load candles, please check the console.');
});
}
}
9 changes: 7 additions & 2 deletions core/workers/pipeline/parent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
var fork = require('child_process').fork;

module.exports = (mode, config, callback) => {
var debug = typeof v8debug === 'object';
if (debug) {
process.execArgv = [];
}

var child = fork(__dirname + '/child');

// How we should handle client messages depends
Expand All @@ -11,7 +16,7 @@ module.exports = (mode, config, callback) => {
what: 'start',
mode: mode,
config: config
}
};

child.on('message', function(m) {

Expand All @@ -27,4 +32,4 @@ module.exports = (mode, config, callback) => {
child.on('exit', handle.exit);

return child;
}
}