ps-watchdog
v1.0.1
Published
A module that kills the current process and all the children if the event loop is unresponsive
Downloads
2
Readme
Ps-watchdog module
Kills the current process and all the children when the JavaScript event loop is busy for more than a configurable amount of time.
It forks a new process that waits for a periodical keepalive from the event loop.
Installing
npm install ps-watchdog
Using
import {Watchdog} from 'ps-watchdog';
const interval = 1000;
const times = 2;
const watchdog = new Watchdog(interval, times);
watchdog.start();
interval: keepalive interval in milliseconds
times: number of times the process can miss the keepalive before getting killed
License
Author
Alessio Paccoia <[email protected]>