first commit
This commit is contained in:
commit
aa7869eb33
386 files changed
+69375
No files matched your search
@@ -0,0 +1,26 @@
|
||||
var util = require(__dirname + '/../../util');
|
||||
|
||||
var dirs = util.dirs();
|
||||
var ipc = require('relieve').IPCEE(process);
|
||||
|
||||
ipc.on('start', config => {
|
||||
|
||||
// force correct gekko env
|
||||
util.setGekkoEnv('child-process');
|
||||
|
||||
// force disable debug
|
||||
config.debug = false;
|
||||
|
||||
// persist config
|
||||
util.setConfig(config);
|
||||
|
||||
var scan = require(dirs.tools + 'dateRangeScanner');
|
||||
scan(
|
||||
(err, ranges, reader) => {
|
||||
reader.close();
|
||||
ipc.send('ranges', ranges);
|
||||
process.exit(0);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
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.');
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user