Created
March 23, 2021 10:17
-
-
Save amalgjose/8a12606a3b0124cda4e193d4ebba2e1a to your computer and use it in GitHub Desktop.
A sample gunicorn hooks configuration
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
def on_starting(server): | |
""" | |
Do something on server start | |
""" | |
print("Server has started") | |
def on_reload(server): | |
""" | |
Do something on reload | |
""" | |
print("Server has reloaded") | |
def post_worker_init(worker): | |
""" | |
Do something on worker initialization | |
""" | |
print("Worker has been initialized. Worker Process id -->", worker.pid) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment