Last active
November 4, 2024 14:46
-
-
Save arynyklas/102de5b3cecc8be14283c42cae6753bd to your computer and use it in GitHub Desktop.
Share signal via gunicorn workers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import signal | |
import os | |
def sync() -> None: | |
os.kill(os.getppid(), signal.SIGUSR1) | |
def reload(*args) -> None: | |
... | |
signal.signal(signal.SIGUSR1, reload) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment