UNPKG

process-rerun

Version:

The purpose of this library is - build simple and flexible interface for parallel command execution with rerun (on fail) possibility

20 lines 904 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.executionWatcher = executionWatcher; const logger_1 = require("./logger"); function executionWatcher(currentTime, limitTime, intervalWatcher, processWhatShouldBeKilled, resolver, resolverArg, cmd) { if (+Date.now() - currentTime > limitTime) { logger_1.logger.log('_______________________________________________________________ \n'); logger_1.logger.log('Process what was started just was killed \n'); logger_1.logger.log('Command is: ', cmd); logger_1.logger.log('_______________________________________________________________ \n'); clearInterval(intervalWatcher); if (processWhatShouldBeKilled) { processWhatShouldBeKilled.kill(); } if (resolver) { resolver(resolverArg); } } } //# sourceMappingURL=utils.js.map