INNER CODE UNIT · Python
root_health_ready
SHAdd0WTAka/Zen-Ai-Pentest · api/main.py:968
async def root_health_ready():
"""
Kubernetes Readiness Probe.
**Alternative:** `GET /api/v1/health/ready` (empfohlen)
"""
import redis
from sqlalchemy import text
db_healthy = False
try:
db = SessionLocal()
db.execute(text("SELECT 1"))
db.close()
db_healthy = True
except Exception:
pass