fix: add initial delay and increase retries for tool server health check
This commit is contained in:
@@ -78,10 +78,12 @@ class DockerRuntime(AbstractRuntime):
|
|||||||
if port_bindings.get(port_key):
|
if port_bindings.get(port_key):
|
||||||
self._tool_server_port = int(port_bindings[port_key][0]["HostPort"])
|
self._tool_server_port = int(port_bindings[port_key][0]["HostPort"])
|
||||||
|
|
||||||
def _wait_for_tool_server(self, max_retries: int = 20, timeout: int = 5) -> None:
|
def _wait_for_tool_server(self, max_retries: int = 30, timeout: int = 5) -> None:
|
||||||
host = self._resolve_docker_host()
|
host = self._resolve_docker_host()
|
||||||
health_url = f"http://{host}:{self._tool_server_port}/health"
|
health_url = f"http://{host}:{self._tool_server_port}/health"
|
||||||
|
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
for attempt in range(max_retries):
|
for attempt in range(max_retries):
|
||||||
try:
|
try:
|
||||||
with httpx.Client(trust_env=False, timeout=timeout) as client:
|
with httpx.Client(trust_env=False, timeout=timeout) as client:
|
||||||
|
|||||||
Reference in New Issue
Block a user