fix(dashboard): cache gateway PID status probes

This commit is contained in:
0disoft 2026-06-27 17:43:26 +09:00
parent 8827300267
commit a2bbe564ad
No known key found for this signature in database
4 changed files with 182 additions and 15 deletions

View file

@ -74,6 +74,7 @@ from hermes_cli.memory_providers import (
from gateway.status import (
derive_gateway_busy,
derive_gateway_drainable,
get_running_pid_cached,
get_running_pid,
get_runtime_status_running_pid,
parse_active_agents,
@ -1931,7 +1932,7 @@ async def get_status(profile: Optional[str] = None):
# Try local PID check first (same-host). If that fails and a remote
# GATEWAY_HEALTH_URL is configured, probe the gateway over HTTP so the
# dashboard works when the gateway runs in a separate container.
gateway_pid = get_running_pid()
gateway_pid = get_running_pid_cached()
gateway_running = gateway_pid is not None
remote_health_body: dict | None = None