mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-14 21:42:57 +00:00
Use simpler API to get health of container
This commit is contained in:
@@ -57,8 +57,8 @@ class TrackedContainer:
|
|||||||
|
|
||||||
def get_health(self) -> str:
|
def get_health(self) -> str:
|
||||||
assert self.container is not None
|
assert self.container is not None
|
||||||
inspect_results = self.docker_client.api.inspect_container(self.container.name)
|
self.container.reload()
|
||||||
return inspect_results["State"]["Health"]["Status"] # type: ignore
|
return self.container.health # type: ignore
|
||||||
|
|
||||||
def exec_cmd(self, cmd: str, **kwargs: Any) -> str:
|
def exec_cmd(self, cmd: str, **kwargs: Any) -> str:
|
||||||
assert self.container is not None
|
assert self.container is not None
|
||||||
|
Reference in New Issue
Block a user