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:
parent
c44b076c2d
commit
ea972f1461
1 changed files with 3 additions and 4 deletions
|
|
@ -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"}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue