Changing from aioredis to redis

aioredist was superceeded by redis

Someone referenced this directly but didn't add it to requirements.in. So when we upgraded channels-redis and it dropped aioredis this started failing
This commit is contained in:
John Westcott IV 2022-11-11 13:31:58 -05:00
parent a1edc75c11
commit 68614b83c0

View File

@ -1,7 +1,6 @@
import datetime
import asyncio
import logging
import aioredis
import redis
import re
@ -82,7 +81,7 @@ class BroadcastWebsocketStatsManager:
async def run_loop(self):
try:
redis_conn = await aioredis.create_redis_pool(settings.BROKER_URL)
redis_conn = await redis.asyncio.create_redis_pool(settings.BROKER_URL)
while True:
stats_data_str = ''.join(stat.serialize() for stat in self._stats.values())
await redis_conn.set(self._redis_key, stats_data_str)