mirror of
https://github.com/docker/compose.git
synced 2025-07-13 08:44:33 +02:00
Silence service pull output when pulling in parallel
Signed-off-by: Evan Shaw <evan@vendhq.com>
This commit is contained in:
parent
05aa8c7285
commit
f85da99ef3
@ -456,7 +456,7 @@ class Project(object):
|
|||||||
|
|
||||||
def pull(self, service_names=None, ignore_pull_failures=False):
|
def pull(self, service_names=None, ignore_pull_failures=False):
|
||||||
def pull_service(service):
|
def pull_service(service):
|
||||||
service.pull(ignore_pull_failures)
|
service.pull(ignore_pull_failures, True)
|
||||||
|
|
||||||
services = self.get_services(service_names, include_deps=False)
|
services = self.get_services(service_names, include_deps=False)
|
||||||
parallel.parallel_execute(
|
parallel.parallel_execute(
|
||||||
|
@ -886,15 +886,17 @@ class Service(object):
|
|||||||
|
|
||||||
return any(has_host_port(binding) for binding in self.options.get('ports', []))
|
return any(has_host_port(binding) for binding in self.options.get('ports', []))
|
||||||
|
|
||||||
def pull(self, ignore_pull_failures=False):
|
def pull(self, ignore_pull_failures=False, silent=False):
|
||||||
if 'image' not in self.options:
|
if 'image' not in self.options:
|
||||||
return
|
return
|
||||||
|
|
||||||
repo, tag, separator = parse_repository_tag(self.options['image'])
|
repo, tag, separator = parse_repository_tag(self.options['image'])
|
||||||
tag = tag or 'latest'
|
tag = tag or 'latest'
|
||||||
|
if not silent:
|
||||||
log.info('Pulling %s (%s%s%s)...' % (self.name, repo, separator, tag))
|
log.info('Pulling %s (%s%s%s)...' % (self.name, repo, separator, tag))
|
||||||
try:
|
try:
|
||||||
output = self.client.pull(repo, tag=tag, stream=True)
|
output = self.client.pull(repo, tag=tag, stream=True)
|
||||||
|
if not silent:
|
||||||
return progress_stream.get_digest_from_pull(
|
return progress_stream.get_digest_from_pull(
|
||||||
stream_output(output, sys.stdout))
|
stream_output(output, sys.stdout))
|
||||||
except (StreamOutputError, NotFound) as e:
|
except (StreamOutputError, NotFound) as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user