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