fix: terminal tools always showing as unhealthy
For terminal-only tools (no URL), only check container status for overall health instead of requiring tunnel health. Terminal tools do not have tunnels, so tunnel_status stays as 'not_applicable' which was failing the healthy check.
This commit is contained in:
@@ -1217,10 +1217,14 @@ async def check_instance_tunnel_health(
|
|||||||
if tunnel_health.get("error"):
|
if tunnel_health.get("error"):
|
||||||
response["error"] = tunnel_health["error"]
|
response["error"] = tunnel_health["error"]
|
||||||
|
|
||||||
# Overall healthy only if container is running AND tunnel is healthy
|
# Overall healthy: web tools need running container + healthy tunnel;
|
||||||
|
# terminal tools only need running container
|
||||||
container_healthy = container_info["status"] == "running"
|
container_healthy = container_info["status"] == "running"
|
||||||
tunnel_healthy = response["tunnel_status"] == "healthy"
|
if instance.url:
|
||||||
response["healthy"] = container_healthy and tunnel_healthy
|
tunnel_healthy = response["tunnel_status"] == "healthy"
|
||||||
|
response["healthy"] = container_healthy and tunnel_healthy
|
||||||
|
else:
|
||||||
|
response["healthy"] = container_healthy
|
||||||
|
|
||||||
# If container is not running, override error message
|
# If container is not running, override error message
|
||||||
if not container_healthy:
|
if not container_healthy:
|
||||||
|
|||||||
Reference in New Issue
Block a user