-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Don't shutdown on reload signal(SIGHUP) when using the reloader option #376
Don't shutdown on reload signal(SIGHUP) when using the reloader option #376
Conversation
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.
Added a some code changes suggestions.
In addition to that though, can you provide an use-case for this?
On a purely practical stand point, I can't foresee a local development condition in which you might rely on SIGHUP to reload Granian.
We use Granian for an app that provides access to data that is stored locally(search indices). We use SIGHUP to update data: 1. download updates, 2. reload workers. |
That's an use-case for SIGHUP, but not reload + SIGHUP combo. And if you're using |
When I am developing locally I am also reloading data and therefore use SIGHUP. Reloading data is not exclusively for production.
We are not using
Yes, whether I am running granian with or without Let me explain how I am using SIGHUP for data reloading: I have an API - lets call it I know you have plans for interworker communication. This would be great for my usecase: instead of reloading workers, I could send a message to every worker to make the update. On other side, the above works well in a graceful manner. |
@hendrikmuhs makes sense, thank you for the detailed explanation. |
Fixes an issue with the reload option: Missing reload handling causes granian with
reload=True
to shutdown instead of respawning workers.