feat(health-check): add pipeline busy status to health endpoint
This commit is contained in:
@@ -421,6 +421,9 @@ def create_app(args):
|
||||
@app.get("/health", dependencies=[Depends(combined_auth)])
|
||||
async def get_status():
|
||||
"""Get current system status"""
|
||||
try:
|
||||
pipeline_status = await get_namespace_data("pipeline_status")
|
||||
|
||||
username = os.getenv("AUTH_USERNAME")
|
||||
password = os.getenv("AUTH_PASSWORD")
|
||||
if not (username and password):
|
||||
@@ -451,7 +454,11 @@ def create_app(args):
|
||||
"core_version": core_version,
|
||||
"api_version": __api_version__,
|
||||
"auth_mode": auth_mode,
|
||||
"pipeline_busy": pipeline_status.get("busy", False)
|
||||
}
|
||||
except Exception as e:
|
||||
logger.error(f"Error getting health status: {str(e)}")
|
||||
raise HTTPException(status_code=500, detail=str(e))
|
||||
|
||||
# Custom StaticFiles class to prevent caching of HTML files
|
||||
class NoCacheStaticFiles(StaticFiles):
|
||||
|
Reference in New Issue
Block a user