Skip to content

Commit 0a82f76

Browse files
committed
fix: return no error when nats is disabled
1 parent 772bc9e commit 0a82f76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/routers/system.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ async def _measure_worker_health(request_coro) -> WorkerHealth:
6060
@router.get("/workers/health", response_model=WorkersHealth)
6161
async def get_workers_health(_: AdminDetails = Depends(get_current)):
6262
if not is_nats_enabled():
63-
unavailable = WorkerHealth(status="unavailable", error="NATS is disabled")
64-
return WorkersHealth(scheduler=unavailable, node=unavailable)
63+
disabled = WorkerHealth(status="disabled")
64+
return WorkersHealth(scheduler=disabled, node=disabled)
6565

6666
timeout = 5.0
6767
scheduler_task = _measure_worker_health(scheduler_nats_client.request("health_check", {}, timeout))

0 commit comments

Comments
 (0)