aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2012-12-04 18:07:23 +0100
committerDavid Sommerseth <davids@redhat.com>2012-12-04 18:07:23 +0100
commit5bd0e9bdeb72a7cf590fc432e0c07dbe27ac1710 (patch)
tree2c108c6e8d8911f3d1de51257f8884132b568729
parent3e236f6b19a4094b8d2246a80d95d9724ef96473 (diff)
downloadrteval-5bd0e9bdeb72a7cf590fc432e0c07dbe27ac1710.tar.gz
Added RtEvalModules::WaitForCompletion() method
This method will block until all running modules have completed their work. Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r--rteval/modules/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py
index 7016eb3..f7bc616 100644
--- a/rteval/modules/__init__.py
+++ b/rteval/modules/__init__.py
@@ -220,6 +220,16 @@ start their workloads yet"""
mod.join(2.0)
+ def WaitForCompletion(self, wtime = None):
+ """Waits for the running modules to complete their running"""
+
+ self._logger.log(Log.INFO, "Waiting for %s modules to complete" % self._module_type)
+ for (modname, mod) in self.__modules:
+ self._logger.log(Log.DEBUG, "\t - Waiting for %s" % modname)
+ mod.finished.wait(wtime)
+ self._logger.log(Log.DEBUG, "All %s modules completed" % self._module_type)
+
+
def MakeReport(self):
"""Collects all the loaded modules reports in a single libxml2.xmlNode() object"""