-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Fixed #31905 -- Made MiddlewareMixin call process_request()/process_response() with thread sensitive. #13334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mgaller — Thanks for this. Were you able to think about the regression test, perhaps in test_middleware_mixin.py
?
@carltongibson
It works, but I am not satisfied with it, maybe you are a little more successful. |
Hey @mgaller. Super thanks. I'll have a play. 👍 |
dcc2921
to
77ca4b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4d102cc
to
e6bf7c3
Compare
Thanks both 👍 @mgaller Welcome aboard ⛵ |
…esponse() with thread sensitive. Co-authored-by: Carlton Gibson <[email protected]>
MiddlewareMixin use sync_to_async with thread_sensitive to prevent errors in database connection clearance.
https://code.djangoproject.com/ticket/31905