process-rerun
Version:
The purpose of this library is - build simple and flexible interface for parallel command execution with rerun (on fail) possibility
18 lines • 772 B
JavaScript
import { logger } from './logger';
function executionWatcher(currentTime, limitTime, intervalWatcher, processWhatShouldBeKilled, resolver, resolverArg, cmd) {
if (+Date.now() - currentTime > limitTime) {
logger.log('_______________________________________________________________ \n');
logger.log('Process what was started just was killed \n');
logger.log('Command is: ', cmd);
logger.log('_______________________________________________________________ \n');
clearInterval(intervalWatcher);
if (processWhatShouldBeKilled) {
processWhatShouldBeKilled.kill();
}
if (resolver) {
resolver(resolverArg);
}
}
}
export { executionWatcher };
//# sourceMappingURL=utils.js.map