-
Notifications
You must be signed in to change notification settings - Fork 33
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
Django 5: log cancellation of async view #351
Comments
I managed implement streaming view support for both async and sync streaming responses in #353 However cancelling async views just freeze the asgi server. I still don't know if I am doing something wrong or there is a bug in django. Help would be appreciated. |
@jrobichaud, can u please give more detail about the freezing of the ASGI server ? |
With an async view when cancelling a request with the client, the request does not end in django. Ex: the Also, the asgi server is not taking any more requests. I have to restart it. |
@jrobichaud, thanks for ur feedback & colossal efforts regardin' this almighty package, I'll do my best to debug this issue guessin' it's a Django's bug ! |
1 similar comment
@jrobichaud, thanks for ur feedback & colossal efforts regardin' this almighty package, I'll do my best to debug this issue guessin' it's a Django's bug ! |
@mohamedTbarka thanks!, this is appreciated! First of all make sure you can reproduce the bug
|
@jrobichaud |
@jrobichaud, I'll open a ticket on "Django issues" if u confirm it of course ! |
You are welcome to open a django ticket if you could spot the bug. When you do, please add the link here please. In order to make it easier for django to reproduce it, did you create a clean project from scratch to reproduce the bug? Referencing django-structlog may just cause confusion. What do you think? |
@mohamedTbarka did you submit django a ticket? Django 5 release candidate is next week. |
The bug is with django-allauth: |
@jrobichaud sorry for the delay due to some health issues, thanks for your precious feedback 🙏 |
I am looking for the update of 0.60.0 of django-allauth. |
can u please explain in detail how django-allauth is the origin of the bug ? |
@mohamedTbarka pennersr/django-allauth#3566 their middleware is not compatible with async requests. |
Django 5.0 now handles cancelling of
async
request:See:
Todo:
Refactor demo project to use js fetch instead of dummy iframe (fixed by Streaming views support and Improve demo project #353 )
(optional) Add front-end log to see request results (fixed by Streaming views support and Improve demo project #353 )
Add to demo project:
(if necessary) fix django-structlog for these four examples (done for streaming view Streaming views support and Improve demo project #353 )
(if possible) log if the request disconnected (fixed by Streaming views support and Improve demo project #353 for streaming views)
Example of cancelling an async call in js (to be added in
django_structlog_demo_project/static/js/project.js
):The text was updated successfully, but these errors were encountered: