Add jobs option for parallel execution, global explorers first.
This commit is contained in:
parent
8d6e0760dc
commit
a4c49201c0
4 changed files with 89 additions and 8 deletions
|
|
@ -70,15 +70,16 @@ def inspect_ssh_mux_opts():
|
|||
class Config(object):
|
||||
"""Cdist main class to hold arbitrary data"""
|
||||
|
||||
def __init__(self, local, remote, dry_run=False):
|
||||
def __init__(self, local, remote, dry_run=False, jobs=None):
|
||||
|
||||
self.local = local
|
||||
self.remote = remote
|
||||
self.log = logging.getLogger(self.local.target_host)
|
||||
self.dry_run = dry_run
|
||||
self.jobs = jobs
|
||||
|
||||
self.explorer = core.Explorer(self.local.target_host, self.local,
|
||||
self.remote)
|
||||
self.remote, jobs=self.jobs)
|
||||
self.manifest = core.Manifest(self.local.target_host, self.local)
|
||||
self.code = core.Code(self.local.target_host, self.local, self.remote)
|
||||
|
||||
|
|
@ -241,7 +242,7 @@ class Config(object):
|
|||
remote_exec=remote_exec,
|
||||
remote_copy=remote_copy)
|
||||
|
||||
c = cls(local, remote, dry_run=args.dry_run)
|
||||
c = cls(local, remote, dry_run=args.dry_run, jobs=args.jobs)
|
||||
c.run()
|
||||
|
||||
except cdist.Error as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue