Skip to content

Commit 16629c0

Browse files
committed
Updated healthcheck handler to return detailed status
1 parent 088785b commit 16629c0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lf_toolkit/io/handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ async def handle_preview(self, req: dict):
5959

6060
async def handle_healthcheck(self, req: dict):
6161
from .healthcheck import run_healthcheck
62-
return await anyio.to_thread.run_sync(run_healthcheck)
62+
result = await anyio.to_thread.run_sync(run_healthcheck)
63+
return {"status": "OK" if result["tests_passed"] else "DEGRADED"}
6364

6465
async def handle(self, name: Command, req: dict) -> dict:
6566
handler = getattr(self, f"handle_{name}", None)

0 commit comments

Comments
 (0)