Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ ____

```shell
python -m unittest discover -s tests -v
poetry run task lint
```

# Обратная связь
Expand Down
6 changes: 3 additions & 3 deletions core/db_adapter/aioredis_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class AIORedisAdapter(AsyncDBAdapter):
def __init__(self, config=None):
super().__init__(config)
self.aioredis = importlib.import_module("redis", "asyncio")
self.aioredis = importlib.import_module("redis.asyncio")
redis_type = self.aioredis.Redis
self._redis: Optional[redis_type] = None

Expand All @@ -36,8 +36,8 @@ async def path_exists(self, path):
return await self._async_run(self._path_exists, path)

async def connect(self):
print("Here is the content of REDIS_CONFIG:", self.config)
print("Connecting to a single redis server")
log("Here is the content of REDIS_CONFIG", params={"config": self.config}, level="DEBUG")
log("Connecting to a single redis server")
config = copy.deepcopy(self.config)
redis_url = config.pop("redis", None)
if not isinstance(redis_url, str):
Expand Down
5 changes: 2 additions & 3 deletions core/db_adapter/aioredis_sentinel_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class AIORedisSentinelAdapter(AsyncDBAdapter):
def __init__(self, config=None):
super().__init__(config)
self.aioredis = importlib.import_module("redis", "asyncio")
self.aioredis = importlib.import_module("redis.asyncio")
sentinel_type = self.aioredis.sentinel.Sentinel
self._sentinel: typing.Optional[sentinel_type] = None
self.service_name = None
Expand All @@ -38,9 +38,8 @@ async def path_exists(self, path):
return await self._async_run(self._path_exists, path)

async def connect(self):

config = copy.deepcopy(self.config)
print("Here is the content of REDIS_CONFIG:", config)
log("Here is the content of REDIS_CONFIG", params={"config": config}, level="DEBUG")
if not isinstance(config, dict):
raise ValueError("REDIS_CONFIG should be a mapping")
sentinels = config.pop("sentinels", None)
Expand Down
Loading