make the compond command check for lists and tuples in the fun

This commit is contained in:
Thomas S Hatch 2012-01-30 13:12:47 -07:00
parent 3f9e2536fa
commit 6a8e09b634

View File

@ -185,7 +185,7 @@ class Minion(object):
self.functions, self.returners = self.__load_modules() self.functions, self.returners = self.__load_modules()
if self.opts['multiprocessing']: if self.opts['multiprocessing']:
if isinstance(data['fun'], list): if isinstance(data['fun'], tuple) or isinstance(data['fun'], list):
multiprocessing.Process( multiprocessing.Process(
target=lambda: self._thread_multi_return(data) target=lambda: self._thread_multi_return(data)
).start() ).start()
@ -194,7 +194,7 @@ class Minion(object):
target=lambda: self._thread_return(data) target=lambda: self._thread_return(data)
).start() ).start()
else: else:
if isinstance(data['fun'], list): if isinstance(data['fun'], tuple) or isinstance(data['fun'], list):
threading.Thread( threading.Thread(
target=lambda: self._thread_multi_return(data) target=lambda: self._thread_multi_return(data)
).start() ).start()