1
This commit is contained in:
Binary file not shown.
@@ -3,7 +3,8 @@ import redis.asyncio as aioredis
|
||||
|
||||
from app.config import settings
|
||||
|
||||
redis_client: aioredis.Redis = aioredis.from_url(settings.redis_url, decode_responses=True)
|
||||
# protocol=2:服务器为 Redis 5.x,不支持 RESP3 的 HELLO 握手(redis-py 8.x 默认尝试 3)
|
||||
redis_client: aioredis.Redis = aioredis.from_url(settings.redis_url, decode_responses=True, protocol=2)
|
||||
|
||||
|
||||
async def get_redis() -> aioredis.Redis:
|
||||
|
||||
Reference in New Issue
Block a user