Skip to content
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

Support for django-channels #58

Open
aqeelat opened this issue Oct 26, 2021 · 2 comments
Open

Support for django-channels #58

aqeelat opened this issue Oct 26, 2021 · 2 comments

Comments

@aqeelat
Copy link

aqeelat commented Oct 26, 2021

Hi,

When I follow the tutorial for setting up the library, I noticed this sequence of events when I run the app:

  1. The reloader is loaded. With it, a cid is generated and included in the log.
  2. When a request is made, the library gets and returns the correct cid to the caller.
  3. At the end of the request lifecycle, channel prints the access log, a new cid is generated and included in the log.
  4. When another request is made, the library, again, gets and returns the correct cid to the caller.
  5. 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
Copy link
Member

dbaty commented Oct 27, 2021

Hello,

I am not familiar with Django Channels. Would you have some code example that exhibits this problem?

@aqeelat
Copy link
Author

aqeelat commented Oct 27, 2021

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants