Skip to content

Instantly share code, notes, and snippets.

@amalgjose
Created March 23, 2021 10:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
A sample gunicorn hooks configuration
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