İlk commit: Stepstead backend (FastAPI)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
commit
ea049b8ccd
45 changed files with 6751 additions and 0 deletions
16
cache.py
Normal file
16
cache.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue