Stop
pulse.stop()
pulse.stop()
Example Usage
const pulse = new Pulse();
pulse.start();
async function graceful() {
await pulse.stop();
process.exit(0);
}
process.on('SIGTERM', graceful);
process.on('SIGINT' , graceful);
process.on('unhandledRejection', (reason, promise) => {
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
graceful();
});
process.on('uncaughtException', (error) => {
console.error('Uncaught Exception thrown', error);
graceful();
});
Parameters
Returns
Promise<void>
: A promise that resolves when the job processing interval is cleared and all locked jobs are unlocked. It handles any failures during the unlocking process.
Last updated
Was this helpful?