MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / wait

Method wait

camel/runtime/docker_runtime.py:365–378  ·  view source on GitHub ↗

r"""Wait for the API Server to be ready. Args: timeout (int): The number of seconds to wait. (default: :obj: `10`) Returns: bool: Whether the API Server is ready.

(self, timeout: int = 10)

Source from the content-addressed store, hash-verified

363 return False
364
365 def wait(self, timeout: int = 10) -> bool:
366 r"""Wait for the API Server to be ready.
367
368 Args:
369 timeout (int): The number of seconds to wait. (default: :obj: `10`)
370
371 Returns:
372 bool: Whether the API Server is ready.
373 """
374 for _ in range(timeout):
375 if self.ok:
376 return True
377 time.sleep(1)
378 return False
379
380 def __enter__(self) -> "DockerRuntime":
381 r"""Enter the context manager.

Calls

no outgoing calls

Tested by

no test coverage detected