def reload_config(self, _): """Handle a request to reload configuration.""" self.logger.info('request to reload configuration') new_config_file = os.getenv('FAUCET_CONFIG', self.config_file) if config_changed(self.config_file, new_config_file, self.config_hashes): self.logger.info('configuration %s changed', new_config_file) self._load_configs(new_config_file) else: self.logger.info('configuration is unchanged, not reloading') # pylint: disable=no-member self.metrics.faucet_config_reload_requests.inc()
def reload_config(self, _): """Handle a request to reload configuration.""" self.logger.info('request to reload configuration') new_config_file = self.config_file if config_changed(self.config_file, new_config_file, self.config_hashes): self.logger.info('configuration %s changed, analyzing differences', new_config_file) self._load_configs(new_config_file) else: self.logger.info('configuration is unchanged, not reloading') self.metrics.faucet_config_reload_requests.inc() # pylint: disable=no-member
def content_changed(self, new_config_file): """Return True if config file content actually changed.""" return config_changed(self.config_file, new_config_file, self.config_hashes)
def content_changed(self, new_config_file): """Return True if config file content actually changed.""" return config_changed(self.config_file, new_config_file, self.config_hashes)