stepstead-backend/cache.py
jts ea049b8ccd İlk commit: Stepstead backend (FastAPI)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 11:30:24 +03:00

16 lines
317 B
Python

import redis.asyncio as aioredis
from config import settings
redis_client: aioredis.Redis = aioredis.from_url(
settings.REDIS_URL,
decode_responses=True,
health_check_interval=30,
)
async def ping() -> bool:
try:
return await redis_client.ping()
except Exception:
return False