Files
video/server/build/lib/app/redis_client.py
T
2026-10-16 13:51:00 +08:00

11 lines
287 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Redis 异步客户端(缓存/计数/队列 Broker)"""
import redis.asyncio as aioredis
from app.config import settings
redis_client: aioredis.Redis = aioredis.from_url(settings.redis_url, decode_responses=True)
async def get_redis() -> aioredis.Redis:
return redis_client