fix(core): add sigkill with 10 second delay
This commit is contained in:
parent
29021a7ffe
commit
7a8ab962b4
@ -21,6 +21,7 @@
|
||||
"tslint-config-prettier": "^1.15.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^3.0.5"
|
||||
"@pushrocks/lik": "^3.0.5",
|
||||
"@pushrocks/smartdelay": "^2.0.3"
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,14 @@ export class SmartExit {
|
||||
let counter = 1;
|
||||
this.processesToEnd.forEach(async childProcessArg => {
|
||||
console.log(`killing process #${counter}`);
|
||||
plugins.smartdelay.delayFor(10000).then(() => {
|
||||
if (childProcessArg.killed) {
|
||||
return;
|
||||
}
|
||||
childProcessArg.kill('SIGKILL');
|
||||
})
|
||||
childProcessArg.kill('SIGINT');
|
||||
|
||||
counter++;
|
||||
});
|
||||
} else {
|
||||
|
@ -5,5 +5,6 @@ export { childProcess };
|
||||
|
||||
// pushrocks scope
|
||||
import * as lik from '@pushrocks/lik';
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
|
||||
export { lik };
|
||||
export { lik, smartdelay };
|
||||
|
Loading…
Reference in New Issue
Block a user