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

Reload on SIGHUP signal when BaseReload class is used (one worker) #2596

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

defue
Copy link

@defue defue commented Mar 11, 2025

PR to reload BaseReload class worker when the SIGHUP signal is received. Currently, the SIGHUP signal causes shutdown. The goal is to make the behaviour consistent with the Multiprocess class.

I use Uvicorn on DEV with one worker and PROD with many workers using systemd with the below config line. Thus, reloading uvicorn with the same command on both DEV and PROD is convenient.
ExecReload=/bin/kill -s HUP $MAINPID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant