mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-14 13:32:56 +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:
|
||||
assert self.container is not None
|
||||
inspect_results = self.docker_client.api.inspect_container(self.container.name)
|
||||
return inspect_results["State"]["Health"]["Status"] # type: ignore
|
||||
self.container.reload()
|
||||
return self.container.health # type: ignore
|
||||
|
||||
def exec_cmd(self, cmd: str, **kwargs: Any) -> str:
|
||||
assert self.container is not None
|
||||
|
Reference in New Issue
Block a user