This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit de207a07dba3b74a4ed7c7dcec599bbfd118ccf3 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Sep 13 15:47:51 2018 +0200 x2gobroker/loadchecker.py: Don't re-read the x2gobroker.conf during each cycle of the load checking loop. Rather read it on service startup and require a service restart when x2gobroker.conf has been changed. --- debian/changelog | 3 +++ x2gobroker/loadchecker.py | 11 ++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7217c4f..cbe2446 100644 --- a/debian/changelog +++ b/debian/changelog @@ -77,6 +77,9 @@ x2gobroker (0.0.4.0-0x2go1) UNRELEASED; urgency=medium - docs/source: Initialize Sphinx API documentation's .rst files. - bin/x2gobroker: If binding the http server fails, a non-zero exit code should be returned. (Fixes: #1013). + - x2gobroker/loadchecker.py: Don't re-read the x2gobroker.conf during + each cycle of the load checking loop. Rather read it on service startup + and require a service restart when x2gobroker.conf has been changed. * debian/*: + Trigger Makefile's install target and install those files. Drop debhelper from-source-installation magic. diff --git a/x2gobroker/loadchecker.py b/x2gobroker/loadchecker.py index 5683555..bc01bf3 100644 --- a/x2gobroker/loadchecker.py +++ b/x2gobroker/loadchecker.py @@ -242,15 +242,12 @@ class LoadChecker(threading.Thread): """ time_to_sleep = 0 - while self.keep_alive: - - # in every loop we re-read the main configuration file(s) - # this allows changes to the config files to take effect immediately... - self.config = x2gobroker.config.X2GoBrokerConfigFile(config_files=self.config_file, defaults=self.config_defaults) - self.load_checker_intervals = self.config.get_value('global', 'load-checker-intervals') + self.config = x2gobroker.config.X2GoBrokerConfigFile(config_files=self.config_file, defaults=self.config_defaults) + self.load_checker_intervals = self.config.get_value('global', 'load-checker-intervals') + self.broker_backends = [ "_".join(bs.split('_')[1:]) for bs in self.config.list_sections() if bs.startswith('broker_') and self.config.get_value(bs, 'enable') ] - self.broker_backends = [ "_".join(bs.split('_')[1:]) for bs in self.config.list_sections() if bs.startswith('broker_') and self.config.get_value(bs, 'enable') ] + while self.keep_alive: # potentially, the X2Go Session Broker can manage different broker backends at the same time, so we initialize # all configured/enabled broker backends -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git