django / channels_redis

Redis channel layer backend for Django Channels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reuse redis connection

bast-ii opened this issue · comments

Is there any way to reuse the connection to redis that channels sets up?
I would like to store data in redis independently of channels, without establishing another connection with redis-py.

There's no public API for it, but the channel layer maintains a reference to the connection.

e.g.

self._connections[index] = aioredis.Redis(connection_pool=pool)