Skip to content
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

Handle SIGINT and other signals to shutdown all running apps gracefully #208

Open
MRIIOT opened this issue Dec 17, 2022 · 2 comments
Open
Labels
bug Something isn't working

Comments

@MRIIOT
Copy link
Contributor

MRIIOT commented Dec 17, 2022

What is the behavior now?

@bburns
Copy link
Contributor

bburns commented Dec 17, 2022

on 'docker stop', a SIGINT signal is sent - if the container doesn't respond to it within 10 seconds, it kills the container.

so we need adapter to catch the SIGINT signals and tell all the running drivers to shutdown / unsubscribe / disconnect.

not crucial but nice to have.

@bburns bburns changed the title Handle Adapter SIGINT etc to shutdown all running drivers gracefully. adapter - handle SIGINT etc to shutdown all running drivers gracefully. Dec 17, 2022
@tukusejssirs tukusejssirs added bug Something isn't working application:adapter Anything related to a specific application labels Dec 22, 2022
@tukusejssirs tukusejssirs changed the title adapter - handle SIGINT etc to shutdown all running drivers gracefully. Handle SIGINT and other signals to shutdown all running apps gracefully Dec 22, 2022
@tukusejssirs tukusejssirs removed the application:adapter Anything related to a specific application label Dec 22, 2022
@tukusejssirs
Copy link
Contributor

@bburns, IMHO we should implement this in each app, not only adapter.

Also, you added etc to the issue title; what other signals should we handle? IMO SIGINT is enough.

Also note that this can be easily handled using Nest. We could even have an API endpoint to shutdown the app. The (micro-) services could communicate using TCP (or any other so-called transport) though, not necessarily using REST/GQL API (actually, REST/GQL API should be available only in the gateway app IMHO which would manage all the other apps/microservices).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants