You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Gunicorn has a
pre_request
server hook:However in my testing, this function does not appear to be called when using Uvicorn workers, i.e.
worker_class = "uvicorn.workers.UvicornWorker"
.Would it be difficult to add support for this server hook? It's useful as a light-duty alternative to ASGI middleware.
There is also a
post_request
server hook that would probably be convenient for some users.Overall, it would at least be useful if the Uvicorn documentation stated which Gunicorn server hooks were/weren't supported by
UvicornWorker
.Beta Was this translation helpful? Give feedback.
All reactions