Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@ladjs/graceful
Advanced tools
Readme
Gracefully exit server (Koa), database (Mongo/Mongoose), Redis clients, Bree job schedulers, Bull job schedulers, and custom handlers.
npm:
npm install @ladjs/graceful
yarn:
yarn add @ladjs/graceful
Using this package will bind process event listeners when graceful.listen()
is called:
process.on('warning')
- will output via config.logger.warn
process.on('unhandledRejection')
- will output via config.logger.error
process.once('uncaughtException')
- will output via config.logger.error
and process.exit(1)
(does not exit gracefully)process.on('message')
- support Windows (e.g. signals not available) and listen for message of shutdown
and then exit gracefullyprocess.once('SIGTERM')
- will exit gracefullyprocess.once('SIGHUP')
- will exit gracefullyprocess.once('SIGINT')
- will exit gracefullyprocess.once('SIGUSR2')
- will exit gracefully (nodemon support)This package also prevents multiple process/SIG events from triggering multiple graceful exits. Only one graceful exit can occur at a time.
See one of these following files from Lad for the most up to date usage example:
You can also read more about Bree at https://github.com/breejs/bree.
Name | Website |
---|---|
Nick Baugh | http://niftylettuce.com/ |
Felix Mosheev | https://github.com/felixmosh |
Nicholai Nissen | https://nicholai.dev |
FAQs
Gracefully exit HTTP servers (Express/Koa/Fastify/etc), databases (Mongo/Mongoose), Bree job schedulers, and custom handlers.
The npm package @ladjs/graceful receives a total of 3,770 weekly downloads. As such, @ladjs/graceful popularity was classified as popular.
We found that @ladjs/graceful demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.