mirror of https://github.com/docker/compose.git
Pull services in parallel
Updates #1652 Signed-off-by: Evan Shaw <evan@vendhq.com>
This commit is contained in:
parent
b0ba14cdb2
commit
21529169ad
|
@ -455,9 +455,16 @@ class Project(object):
|
|||
return plans
|
||||
|
||||
def pull(self, service_names=None, ignore_pull_failures=False):
|
||||
for service in self.get_services(service_names, include_deps=False):
|
||||
def pull_service(service):
|
||||
service.pull(ignore_pull_failures)
|
||||
|
||||
services = self.get_services(service_names, include_deps=False)
|
||||
parallel.parallel_execute(
|
||||
services,
|
||||
pull_service,
|
||||
operator.attrgetter('name'),
|
||||
'Pulling')
|
||||
|
||||
def push(self, service_names=None, ignore_push_failures=False):
|
||||
for service in self.get_services(service_names, include_deps=False):
|
||||
service.push(ignore_push_failures)
|
||||
|
|
Loading…
Reference in New Issue