Pull services in parallel

Updates #1652

Signed-off-by: Evan Shaw <evan@vendhq.com>
This commit is contained in:
Evan Shaw 2017-02-04 13:26:45 +13:00
parent b0ba14cdb2
commit 21529169ad
1 changed files with 8 additions and 1 deletions

View File

@ -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)