ps-watchdog
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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>

/ps-watchdog/

    Package Sidebar

    Install

    npm i ps-watchdog

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    7.42 kB

    Total Files

    12

    Last publish

    Collaborators

    • alessiopcc