-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add graceful shutdown #115
Conversation
When a shutdown signal is sent, we need to do graceful shutdown out of Node.js and Express to avoid side effects like finishing active requests before closing server, clean up resources, db connections etc. see: https://stackfame.com/node-express-graceful-shutdown
@@ -194,6 +194,15 @@ npm run | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGES_NEXT_RELEASE entry as in PR telefonicaid/iotagent-json#606, pls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed Fixed 6f9106f
lib/sigfoxServer.js
Outdated
* | ||
*/ | ||
function handleShutdown(signal) { | ||
config.getLogger().fatal(context, 'Received %s, starting shutdown processs', signal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be info, as in PR telefonicaid/iotagent-json#606
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd already done that - just didn't push. Fixed 6f9106f
Co-authored-by: Fermín Galán Márquez <fgalan@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When a shutdown signal is sent, we need to do graceful shutdown out of Node.js and Express to avoid side effects
like finishing active requests before closing server, clean up resources, db connections etc.
see: https://stackfame.com/node-express-graceful-shutdown