listener-fix-2
All checks were successful
deploy / deploy (push) Successful in 1m17s

This commit is contained in:
Untone 2023-11-26 22:41:33 +03:00
parent f03b7a8011
commit 2174a99a24

View File

@ -56,7 +56,10 @@ class RedisCache:
while True:
message = await pubsub.get_message()
if message and isinstance(message['data'], (str, bytes, bytearray)):
yield json.loads(message['data'])
try:
yield json.loads(message['data'])
except json.JSONDecodeError as e:
print(f"Error decoding JSON: {e}")
await asyncio.sleep(0.1)