Francesco Romani has uploaded a new change for review. Change subject: guest monitor: add an interval attribute ......................................................................
guest monitor: add an interval attribute Expose the monitoring interval as a GuestMonitor attribute. A future patch wants to make use of it. Change-Id: I25e817bbae8e806aad914241831b5e5bbba461e1 Signed-off-by: Francesco Romani <[email protected]> --- M mom/GuestMonitor.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/mom refs/changes/90/31590/1 diff --git a/mom/GuestMonitor.py b/mom/GuestMonitor.py index 47fd9f5..605170a 100644 --- a/mom/GuestMonitor.py +++ b/mom/GuestMonitor.py @@ -31,6 +31,7 @@ threading.Thread.__init__(self, name="guest:%s" % id) self.config = config self.logger = logging.getLogger('mom.GuestMonitor') + self.interval = self.config.getint('main', 'guest-monitor-interval') self.setName("GuestMonitor-%s" % info['name']) Monitor.__init__(self, config, self.getName()) @@ -49,10 +50,9 @@ def run(self): try: self.logger.info("%s starting", self.getName()) - interval = self.config.getint('main', 'guest-monitor-interval') while self._should_run(): self.collect() - time.sleep(interval) + time.sleep(self.interval) except Exception as e: self.logger.error("%s crashed", self.getName(), exc_info=True) else: -- To view, visit http://gerrit.ovirt.org/31590 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25e817bbae8e806aad914241831b5e5bbba461e1 Gerrit-PatchSet: 1 Gerrit-Project: mom Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
