chrysopedia/backend/redis_client.py
jlightner c2edba952c test: Built 9 review queue API endpoints (queue, stats, approve, reject…
- "backend/routers/review.py"
- "backend/schemas.py"
- "backend/redis_client.py"
- "backend/main.py"
- "backend/tests/test_review.py"

GSD-Task: S04/T01
2026-03-29 23:13:43 +00:00

15 lines
446 B
Python

"""Async Redis client helper for Chrysopedia."""
import redis.asyncio as aioredis
from config import get_settings
async def get_redis() -> aioredis.Redis:
"""Return an async Redis client from the configured URL.
Callers should close the connection when done, or use it
as a short-lived client within a request handler.
"""
settings = get_settings()
return aioredis.from_url(settings.redis_url, decode_responses=True)