diff --git a/services/rediscache.py b/services/rediscache.py index da69df1..23ad6bb 100644 --- a/services/rediscache.py +++ b/services/rediscache.py @@ -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)