Skip to content

Commit d01a91a

Browse files
[docker-wait-any] immediately start to wait
It could happen that a container has already crashed but docker-wait-any will wait forever till it starts. It should, however, immediately exit to make the serivce restart. Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
1 parent 925a393 commit d01a91a

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

files/image_config/misc/docker-wait-any

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ g_dep_services = []
4747

4848
def wait_for_container(docker_client, container_name):
4949
while True:
50-
while docker_client.inspect_container(container_name)['State']['Status'] != "running":
51-
time.sleep(1)
52-
5350
docker_client.wait(container_name)
5451

5552
log.log_info("No longer waiting on container '{}'".format(container_name))

0 commit comments

Comments
 (0)