Skip to content

Instantly share code, notes, and snippets.

@arynyklas
Last active November 4, 2024 14:46
Show Gist options
  • Save arynyklas/102de5b3cecc8be14283c42cae6753bd to your computer and use it in GitHub Desktop.
Save arynyklas/102de5b3cecc8be14283c42cae6753bd to your computer and use it in GitHub Desktop.
Share signal via gunicorn workers
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