Support for django-channels
aqeelat opened this issue · 2 comments
aqeelat commented
Hi,
When I follow the tutorial for setting up the library, I noticed this sequence of events when I run the app:
- The reloader is loaded. With it, a cid is generated and included in the log.
- When a request is made, the library gets and returns the correct cid to the caller.
- At the end of the request lifecycle, channel prints the access log, a new cid is generated and included in the log.
- When another request is made, the library, again, gets and returns the correct cid to the caller.
- At the end of the request lifecycle, the same cid as in step 3 is used in the log. This same cid is used in all subsequent access logs.
Channels log definition: https://github.com/django/channels/blob/main/channels/management/commands/runserver.py#L142
Helpful PR: https://github.com/django/channels/pull/693/files
The line that generates the response in channels: https://github.com/django/channels/blob/main/channels/http.py#L256
dbaty commented
Hello,
I am not familiar with Django Channels. Would you have some code example that exhibits this problem?
aqeelat commented
I created this sample project to show the issue:
https://github.com/AqeelAT/django_channels_project
run the app and go to localhost:8000/api/hello/hello/