Skip to content

Commit 92a682d

Browse files
author
Andrei Neagu
committed
ensure it timesout
1 parent e1fe41d commit 92a682d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/service-library/src/servicelib/docker_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import asyncio
12
import logging
23
from collections.abc import AsyncIterator, Awaitable, Callable
34
from contextlib import AsyncExitStack, asynccontextmanager
@@ -347,7 +348,7 @@ async def _(app: FastAPI) -> AsyncIterator[None]:
347348
reraise=True,
348349
)
349350
async def wait_till_docker_api_proxy_is_responsive(app: FastAPI) -> None:
350-
await get_remote_docker_client(app).version()
351+
await asyncio.wait_for(get_remote_docker_client(app).version(), timeout=5)
351352

352353

353354
def get_remote_docker_client(app: FastAPI) -> aiodocker.Docker:

0 commit comments

Comments
 (0)