|
|
@ -63,6 +63,7 @@ PROCESS_LOCKFILE = tempfile.TemporaryFile()
|
|
|
|
|
|
|
|
|
|
|
|
from foon import Foon
|
|
|
|
from foon import Foon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FOON = Foon()
|
|
|
|
|
|
|
|
|
|
|
|
################################################
|
|
|
|
################################################
|
|
|
|
|
|
|
|
|
|
|
@ -1057,10 +1058,11 @@ class Runner(object):
|
|
|
|
|
|
|
|
|
|
|
|
# *****************************************************
|
|
|
|
# *****************************************************
|
|
|
|
|
|
|
|
|
|
|
|
def _parallel_exec(self, params):
|
|
|
|
def _parallel_exec(self, hosts):
|
|
|
|
''' handles mulitprocessing when more than 1 fork is required '''
|
|
|
|
''' handles mulitprocessing when more than 1 fork is required '''
|
|
|
|
|
|
|
|
|
|
|
|
return self.foon.map(_executor_hook, params)
|
|
|
|
FOON.set_size(self.forks)
|
|
|
|
|
|
|
|
return FOON.map(_executor_hook, hosts)
|
|
|
|
|
|
|
|
|
|
|
|
# *****************************************************
|
|
|
|
# *****************************************************
|
|
|
|
|
|
|
|
|
|
|
@ -1112,8 +1114,6 @@ class Runner(object):
|
|
|
|
if self.forks == 0 or self.forks > len(hosts):
|
|
|
|
if self.forks == 0 or self.forks > len(hosts):
|
|
|
|
self.forks = len(hosts)
|
|
|
|
self.forks = len(hosts)
|
|
|
|
|
|
|
|
|
|
|
|
self.foon = Foon(self.forks)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if p and getattr(p, 'BYPASS_HOST_LOOP', None):
|
|
|
|
if p and getattr(p, 'BYPASS_HOST_LOOP', None):
|
|
|
|
|
|
|
|
|
|
|
|
# Expose the current hostgroup to the bypassing plugins
|
|
|
|
# Expose the current hostgroup to the bypassing plugins
|
|
|
|