Skip to content

Commit

Permalink
ensure it timesout
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Neagu committed Jan 31, 2025
1 parent e1fe41d commit 92a682d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/service-library/src/servicelib/docker_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
import logging
from collections.abc import AsyncIterator, Awaitable, Callable
from contextlib import AsyncExitStack, asynccontextmanager
@@ -347,7 +348,7 @@ async def _(app: FastAPI) -> AsyncIterator[None]:
reraise=True,
)
async def wait_till_docker_api_proxy_is_responsive(app: FastAPI) -> None:
await get_remote_docker_client(app).version()
await asyncio.wait_for(get_remote_docker_client(app).version(), timeout=5)


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

0 comments on commit 92a682d

Please sign in to comment.