mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-20 07:43:35 -05:00
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:
@@ -1,7 +1,6 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
import aioredis
|
|
||||||
import redis
|
import redis
|
||||||
import re
|
import re
|
||||||
|
|
||||||
@@ -82,7 +81,7 @@ class BroadcastWebsocketStatsManager:
|
|||||||
|
|
||||||
async def run_loop(self):
|
async def run_loop(self):
|
||||||
try:
|
try:
|
||||||
redis_conn = await aioredis.create_redis_pool(settings.BROKER_URL)
|
redis_conn = await redis.asyncio.create_redis_pool(settings.BROKER_URL)
|
||||||
while True:
|
while True:
|
||||||
stats_data_str = ''.join(stat.serialize() for stat in self._stats.values())
|
stats_data_str = ''.join(stat.serialize() for stat in self._stats.values())
|
||||||
await redis_conn.set(self._redis_key, stats_data_str)
|
await redis_conn.set(self._redis_key, stats_data_str)
|
||||||
|
|||||||
Reference in New Issue
Block a user