channels - async consumer behind sync middleware

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

channels - async consumer behind sync middleware

Özgür Akçalı
I am using async consumers, and everything they do is async, except for a middleware. I have a custom authentication middleware that connects to the database and runs 2-3 queries. 

It is suggested in the docs that if anything non-async is done in the consumer, we should use sync consumers. Same principle applies here, or is it ok to do sync stuff in a middleware as it is done only on session initializaiton?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b25ed3aa-4c7c-43a6-9156-3ada4ec23b20n%40googlegroups.com.