Skip to content

Commit 8d5af8b

Browse files
committed
chore/killing step improve
1 parent 5cfeafb commit 8d5af8b

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/exec.proc.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ function buildExecRunner(notRetriable, runOpts) {
4242
const killTooLongExecution = procWhatShouldBeKilled => {
4343
const executionTime = +Date.now() - startTime;
4444
if (executionTime > longestProcessTime) {
45-
logger.info(`Process killed due to long time execution: ${millisecondsToMinutes(executionTime)}`);
4645
if (executionTime - longestProcessTime > 5000) {
47-
execProc.emit('exit', 100, 'PRO_RERUN_KILL');
48-
execProc.emit('close', 100, 'PRO_RERUN_KILL');
46+
procWhatShouldBeKilled.emit('exit', 100, 'PRO_RERUN_KILL');
47+
procWhatShouldBeKilled.emit('close', 100, 'PRO_RERUN_KILL');
4948
} else {
50-
procWhatShouldBeKilled.kill();
49+
logger.info(`Process killed due to long time execution: ${millisecondsToMinutes(executionTime)}`);
50+
procWhatShouldBeKilled.kill('SIGKILL');
5151
}
5252
}
5353
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "process-rerun",
3-
"version": "0.2.8",
3+
"version": "0.2.9",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/potapovDim/protractor-rerun.git"
@@ -10,7 +10,7 @@
1010
"tscw": "tsc -w",
1111
"validate": "npm ls",
1212
"test": "mocha $(find specs -name '*.spec.*') --timeout 500000 --require ts-node/register",
13-
"build": "tsc",
13+
"build": "rm -rf ./built && tsc",
1414
"lint": "eslint --ext .ts ./ --fix"
1515
},
1616
"author": {

0 commit comments

Comments
 (0)