Fix generating pytest for training service 2

This commit is contained in:
Urtzi Alfaro
2025-07-25 14:46:45 +02:00
parent 499d6a1db0
commit 7995429454
10 changed files with 13 additions and 5936 deletions

View File

@@ -220,6 +220,19 @@ async def get_metrics():
return app.state.metrics_collector.get_metrics()
return {"status": "metrics not available"}
@app.get("/health/live")
async def liveness_check():
return {"status": "alive"}
@app.get("/health/ready")
async def readiness_check():
ready = getattr(app.state, 'ready', True)
return {"status": "ready" if ready else "not ready"}
@app.get("/")
async def root():
return {"service": "training-service", "version": "1.0.0"}
if __name__ == "__main__":
uvicorn.run(
"app.main:app",