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

Fix wrong reference to AsyncConsumer in Introduction #1750

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DanielSwain
Copy link
Contributor

Change AsyncConsumer to AsyncWebsocketConsumer

Change AsyncConsumer to AsyncWebsocketConsumer
Copy link
Member

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @DanielSwain.

Is this right? Subclassing AsyncWebsocketConsumer you'd implement receive() rather than override the websocket_connect() and websocket_receive() methods, which are implemented for you, and are the benefit of using the generic consumer... 🤔

@DanielSwain
Copy link
Contributor Author

@carltongibson Perhaps. I only traced the AsyncConsumer definition in the code and saw that it didn't have function definitions for either websocket_connect() or websocket_receive() and so figured that the author of the docs intended AsyncConsumer to be AsyncWebsocketConsumer since websocket_connect() and websocket_receive() were specifically overridden in the example provided. With what you're saying, however, perhaps that assumption is backwards. It seems that there is definitely an error in the docs here, so I'll let it to you or the original document writer (if not you) to take it from here.

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

Successfully merging this pull request may close these issues.

2 participants