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

Method ok

camel/runtime/docker_runtime.py:351–363  ·  view source on GitHub ↗

r"""Check if the API Server is running. Returns: bool: Whether the API Server is running.

(self)

Source from the content-addressed store, hash-verified

349
350 @property
351 def ok(self) -> bool:
352 r"""Check if the API Server is running.
353
354 Returns:
355 bool: Whether the API Server is running.
356 """
357 if not self.container:
358 return False
359 try:
360 _ = requests.get(f"http://localhost:{self.port}")
361 return True
362 except requests.exceptions.ConnectionError:
363 return False
364
365 def wait(self, timeout: int = 10) -> bool:
366 r"""Wait for the API Server to be ready.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected