This commit is contained in:
parent
f03b7a8011
commit
2174a99a24
|
@ -56,7 +56,10 @@ class RedisCache:
|
||||||
while True:
|
while True:
|
||||||
message = await pubsub.get_message()
|
message = await pubsub.get_message()
|
||||||
if message and isinstance(message['data'], (str, bytes, bytearray)):
|
if message and isinstance(message['data'], (str, bytes, bytearray)):
|
||||||
|
try:
|
||||||
yield json.loads(message['data'])
|
yield json.loads(message['data'])
|
||||||
|
except json.JSONDecodeError as e:
|
||||||
|
print(f"Error decoding JSON: {e}")
|
||||||
await asyncio.sleep(0.1)
|
await asyncio.sleep(0.1)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user