-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
Consider mentioning Django's Async ORM Interface #1999
Comments
I'm happy to look at a draft of this certainly! 👍 |
Similarly in Consumers docs:
Database Access:
|
@carltongibson Before we document support for this, are there any reasons why the async ORM interface wouldn't be supported within the AsyncConsumers? I started playing around with a my_model = await MyModel.objects.aget(id=1) But this started generating errors when the unit test was executed.
Database is Postgres. This only seems to happen when I mix in the Async ORM within the AsyncConsumer. I just want to make sure something isn't documented that might have some known issues/limitations/considerations. Test Environment
|
Grrr. Ok. Grrr. Let's pause. I will try and have a look, but it's not going to be instant. Thanks! |
Sure thing! No rush at all. I just wanted to report some of the initial findings I had. |
I just found this issue while going through the issue backlog. I’ve put up #2090 to document the API! |
Tutorial 3, section "Rewrite the consumer to be asynchronous" states:
This feels like it was written before the Django async ORM interface. It might be worth somehow mentioning that in Django 4.1+, there is at least an
async
interface for the ORM. Otherwise, new users might get the feeling like that if they do anything with ORMModel
s, it will be synchronous anyway and might not realize they could pursue moreasync
in a more natural way with channels and modern versions of Django.The text was updated successfully, but these errors were encountered: