Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
lastRespawn = now;
fastRespawn = 0;
}
console.log(`${formatTime(now)} daemon.js::respawn: program[${dir}] worker[${i}]`);
restarted[i]++;
program.lastRestart = Date.now();
let worker = workers[i] = _spawn(process.execPath, args, option);
worker.program = program;
worker.on('exit', onExit);
worker.on('message', onMessage);
if (timeStamp) {
worker.stdout.pid = worker.stderr.pid = worker.pid;
worker.stdout.on('data', onPipeData1);
worker.stderr.on('data', onPipeData2);
}
scheduler.onWorker(worker);
}
}