Loading images/docker/compose-health-check +5 −3 Original line number Original line Diff line number Diff line Loading @@ -21,9 +21,11 @@ def get_project_containers_health(client, project): their status). their status). """ """ return { return { i: i.attrs["State"]["Health"]["Status"] i: ( i.attrs["State"]["Health"]["Status"] if "Health" in i.attrs["State"] if "Health" in i.attrs["State"] else i.attrs["State"]["Status"] else i.attrs["State"]["Status"] ) for i in client.containers.list( for i in client.containers.list( filters={"label": f"com.docker.compose.project={project}"} filters={"label": f"com.docker.compose.project={project}"} ) ) Loading Loading
images/docker/compose-health-check +5 −3 Original line number Original line Diff line number Diff line Loading @@ -21,9 +21,11 @@ def get_project_containers_health(client, project): their status). their status). """ """ return { return { i: i.attrs["State"]["Health"]["Status"] i: ( i.attrs["State"]["Health"]["Status"] if "Health" in i.attrs["State"] if "Health" in i.attrs["State"] else i.attrs["State"]["Status"] else i.attrs["State"]["Status"] ) for i in client.containers.list( for i in client.containers.list( filters={"label": f"com.docker.compose.project={project}"} filters={"label": f"com.docker.compose.project={project}"} ) ) Loading