Skip to content

Commit

Permalink
fix issue with a sighup config reload, not working for base backups
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-adnuntius committed Mar 24, 2021
1 parent 99eadbf commit 6c4b997
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pghoard/pghoard.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,10 @@ def load_config(self, _signal=None, _frame=None): # pylint: disable=unused-argu
raise
raise InvalidConfigurationError(self.config_path)

# clear this objects site transfer storage config
self.site_transfers = {}
self.config = new_config

if self.config.get("syslog") and not self.syslog_handler:
self.syslog_handler = logutil.set_syslog_handler(
address=self.config.get("syslog_address", "/dev/log"),
Expand All @@ -726,6 +729,10 @@ def load_config(self, _signal=None, _frame=None): # pylint: disable=unused-argu
prometheus=self.config.get("prometheus", None)
)

# need to refresh the web server config too
if hasattr(self, "webserver") and hasattr(self.webserver, "server"):
self.webserver.server.config = new_config

for thread in self._get_all_threads():
thread.config = new_config
thread.site_transfers = {}
Expand Down

0 comments on commit 6c4b997

Please sign in to comment.