Skip to content

Commit

Permalink
Add docker timeouts for tty
Browse files Browse the repository at this point in the history
  • Loading branch information
tedmiston committed Sep 8, 2017
1 parent 2f57e6a commit 89e8674
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion airflow/operators/docker_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def execute(self, context):
)
self.docker_url = self.docker_url.replace('tcp://', 'https://')

self.cli = APIClient(base_url=self.docker_url, version=self.api_version, tls=tls_config)
self.cli = APIClient(base_url=self.docker_url, version=self.api_version, tls=tls_config, timeout=120)

if ':' not in self.image:
image = self.image + ':latest'
Expand Down Expand Up @@ -186,6 +186,7 @@ def execute(self, context):
mem_limit=self.mem_limit,
user=self.user,
tty=True,
stop_timeout=120,
)
self.cli.start(self.container['Id'])
logging.info('started cli')
Expand Down

0 comments on commit 89e8674

Please sign in to comment.