This is a problem with _any_ ASGI app, not just middleware - doing blocking
things in the __init__ is bad.
I will look at the docs when I look at solving the SessionMiddleware
problem as well, as the two are linked.
Andrew
On Sun, Mar 4, 2018 at 7:10 AM, Hugo Castilho wrote:
>
>
> The example
The example in the Channels documentation shows it being used with a
consumer called consumers.AsyncChatConsumer which suggests it's safe to use
with async consumers.
There probably should be a note there that it's currently not safe to use
with async consumers no?
Regarding the SessionMiddle
Hi Hugo,
The AuthMiddleware, like its Django counterpart, does not query the auth
backend immediately - it is lazily done the first time you access the
scope["user"] object. This does present a risk that you could access it
during an async method body, though - I will look into how we could fix
th
Hi all,
The channels authentication documentation
(https://channels.readthedocs.io/en/latest/topics/authentication.html)
shows using the channels AuthMiddleware with an AsyncConsumer.
Now, my problem is that all session backends in Django are blocking.
I know that the user is only retrieved la
4 matches
Mail list logo