This repository has been archived on 2025-10-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
gekko/core/workers/dateRangeScan/parent.js
T
2021-06-06 20:25:14 +02:00

22 lines
510 B
JavaScript

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);
task.once('ranges', ranges => {
return done(false, ranges);
});
task.on('exit', code => {
if(code !== 0)
done('ERROR, unable to scan dateranges, please check the console.');
});
}