1.0.1 • Published 5 years ago

ps-watchdog v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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

MIT

Author

Alessio Paccoia <alessio.paccoia@cubbit.io>

1.0.1

5 years ago

1.0.0

6 years ago