Skip to content

Commit 4410146

Browse files
committed
1 hour timeout when waiting for logs
1 parent 1959875 commit 4410146

File tree

1 file changed

+10
-1
lines changed
  • services/dask-sidecar/src/simcore_service_dask_sidecar/computational_sidecar

1 file changed

+10
-1
lines changed

services/dask-sidecar/src/simcore_service_dask_sidecar/computational_sidecar/docker_utils.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,11 @@ async def _parse_container_log_file( # noqa: PLR0913 # pylint: disable=too-many
247247
)
248248

249249

250+
_MINUTE: Final[int] = 60
251+
_HOUR: Final[int] = 60 * _MINUTE
252+
_AIODOCKER_LOGS_TIMEOUT_S: Final[int] = 1 * _HOUR
253+
254+
250255
async def _parse_container_docker_logs(
251256
*,
252257
container: DockerContainer,
@@ -273,7 +278,11 @@ async def _parse_container_docker_logs(
273278
async for log_line in cast(
274279
AsyncGenerator[str, None],
275280
container.log(
276-
stdout=True, stderr=True, follow=True, timestamps=True
281+
stdout=True,
282+
stderr=True,
283+
follow=True,
284+
timestamps=True,
285+
timeout=_AIODOCKER_LOGS_TIMEOUT_S,
277286
),
278287
):
279288
log_msg_without_timestamp = log_line.split(" ", maxsplit=1)[1]

0 commit comments

Comments
 (0)