mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Remove timeout when waiting for container to finish. (#527)
This commit is contained in:
@@ -281,7 +281,7 @@ class EngineDriver(object):
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def wait_for_container(self, client, container_id):
|
||||
def wait_for_container(self, client, container_id, timeout=None):
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
|
||||
@@ -269,8 +269,8 @@ class DockerAPIEngineDriver(EngineDriver):
|
||||
def start_container(self, client, container_id):
|
||||
client.post_json('/containers/{0}/start', container_id)
|
||||
|
||||
def wait_for_container(self, client, container_id):
|
||||
return client.post_json_to_json('/containers/{0}/wait', container_id)['StatusCode']
|
||||
def wait_for_container(self, client, container_id, timeout=None):
|
||||
return client.post_json_to_json('/containers/{0}/wait', container_id, timeout=timeout)['StatusCode']
|
||||
|
||||
def get_container_output(self, client, container_id):
|
||||
config = client.get_json('/containers/{0}/json', container_id)
|
||||
|
||||
Reference in New Issue
Block a user