From 5115b5bd68879313a44c5e0998f2090fb444a35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Andr=C3=A9s=20Marino=20Rojas?= <47573394+Marinovsky@users.noreply.github.com> Date: Mon, 9 Oct 2023 18:51:30 -0500 Subject: [PATCH] Increase timeout and enhance error logs in `lean live stop` command (#371) * Increase timeout to 1 min and enhance error logs * nit change * Improve error logs * nit change --- lean/components/docker/docker_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lean/components/docker/docker_manager.py b/lean/components/docker/docker_manager.py index afacdbdf..5f08a226 100644 --- a/lean/components/docker/docker_manager.py +++ b/lean/components/docker/docker_manager.py @@ -456,7 +456,7 @@ def write_to_file(self, docker_container_name: str, docker_file: Path, data: Dic except Exception as e: raise ValueError(f"Failed to write to {docker_file.name}: {e}") - def read_from_file(self, docker_container_name: str, docker_file: Path, interval=1, timeout=30) -> Dict[str,Any]: + def read_from_file(self, docker_container_name: str, docker_file: Path, interval=1, timeout=60) -> Dict[str,Any]: """Read data from file in docker. Args: @@ -499,7 +499,7 @@ def read_from_file(self, docker_container_name: str, docker_file: Path, interval if not success: error_message = "Rejected by Lean. Possible arguments error. Please check your logs and try again." if not success and not error_message: - error_message = f"Failed to read result from docker file {docker_file.name} within {timeout} seconds" + error_message = f"Failed to read result from docker file {docker_file.name} within {timeout} seconds. This could be due to an action taking longer than expected. Run 'docker logs {docker_container_name}' for more information." return { "error": error_message,