refactoring and optimization

This commit is contained in:
Vladless
2026-02-27 22:04:01 +03:00
parent 5709dca63c
commit 18a72f9410
14 changed files with 243 additions and 129 deletions
+6 -1
View File
@@ -24,7 +24,12 @@ async def _get_redis() -> Any | None:
try:
redis_from_url = import_module("redis.asyncio").from_url
client = redis_from_url(REDIS_URL, encoding="utf-8", decode_responses=True)
client = redis_from_url(
REDIS_URL,
encoding="utf-8",
decode_responses=True,
max_connections=64,
)
await client.ping()
_REDIS_CLIENT = client
return _REDIS_CLIENT