feat(imajin-diffusion): Introduce /health endpoint for service monitoring with basic dependency checks

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Claude Code 2026-03-30 09:29:29 -07:00
parent c44b076c2d
commit ea972f1461

View file

@ -96,9 +96,8 @@ async def health_check() -> HealthResponse:
"""Health check endpoint with GPU coordination status."""
import image_pipeline.stages.generate as gen
# Check GPU coordination status
# If _boss is not None, it means it was successfully initialized and connected
gpu_connected = gen._boss is not None
# Check GPU coordination status via v4 initialization gate
gpu_connected = gen._diffusers_loader is not None
active_leases = 0
if gen._diffusers_loader is not None:
@ -129,7 +128,7 @@ async def readiness():
import image_pipeline.stages.generate as gen
from fastapi import HTTPException
if gen._boss is None:
if gen._diffusers_loader is None:
raise HTTPException(status_code=503, detail="GPU coordination not initialized")
return {"status": "ready", "service": "imajin-diffusion"}