diff --git a/src/socketio/asyncio_redis_manager.py b/src/socketio/asyncio_redis_manager.py index 23f5cae..73adb44 100644 --- a/src/socketio/asyncio_redis_manager.py +++ b/src/socketio/asyncio_redis_manager.py @@ -59,10 +59,11 @@ class AsyncRedisManager(AsyncPubSubManager): # pragma: no cover async for message in self.pubsub.listen(): yield message['data'] except aioredis.exceptions.RedisError: - self._get_logger().error('Cannot receive from redis... ' - 'retrying in {} secs'.format(retry_sleep)) + self._get_logger().error( + "Cannot receive from redis... " + "retrying in {} secs".format(retry_sleep) + ) await asyncio.sleep(retry_sleep) retry_sleep *= 2 if retry_sleep > 60: retry_sleep = 60 - diff --git a/src/socketio/redis_manager.py b/src/socketio/redis_manager.py index 836dc5b..ebaa347 100644 --- a/src/socketio/redis_manager.py +++ b/src/socketio/redis_manager.py @@ -1,4 +1,3 @@ -import logging import pickle import time @@ -76,8 +75,10 @@ class RedisManager(PubSubManager): # pragma: no cover for message in self.pubsub.listen(): yield message['data'] except redis.exceptions.RedisError: - self._get_logger().error('Cannot receive from redis... ' - 'retrying in {} secs'.format(retry_sleep)) + self._get_logger().error( + "Cannot receive from redis... " + "retrying in {} secs".format(retry_sleep) + ) time.sleep(retry_sleep) retry_sleep *= 2 if retry_sleep > 60: