diff options
author | Clark Williams <williams@redhat.com> | 2015-11-19 14:05:15 -0600 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2015-11-19 15:19:04 -0600 |
commit | 9c904407e50d320dc09d2749ef0d8e4fb66b9f50 (patch) | |
tree | fac5a9b3d72321dc24bc1eb83efe1e2f783bd74d | |
parent | b3ca853cc0a1aa80d8c2633a68d7ab25e98aead2 (diff) | |
download | rteval-9c904407e50d320dc09d2749ef0d8e4fb66b9f50.tar.gz |
modules: modify the run() sleeptime to be configurable and default to 5 seconds
Signed-off-by: Clark Williams <williams@redhat.com>
-rw-r--r-- | rteval/modules/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py index 12a544b..583d309 100644 --- a/rteval/modules/__init__.py +++ b/rteval/modules/__init__.py @@ -56,6 +56,7 @@ class rtevalModulePrototype(threading.Thread): "finished": threading.Event()} self._donotrun = False self.__timestamps = {} + self.__sleeptime = 5.0 def _log(self, logtype, msg): @@ -191,7 +192,8 @@ class rtevalModulePrototype(threading.Thread): if not self.WorkloadAlive(): self._log(Log.DEBUG, "%s workload stopped running." % self._module_type) break - time.sleep(60.0) + time.sleep(self.__sleeptime) + self.__timestamps["runloop_stop"] = datetime.now() self._log(Log.DEBUG, "stopping %s workload" % self._module_type) else: |