Skip to content

Commit

Permalink
Merge pull request #420 from Adnuntius/jp_fix_basebackup_config_reloa…
Browse files Browse the repository at this point in the history
…d_issue

fix issue with a sighup config reload, not working for base backups

#420
  • Loading branch information
Ormod authored Mar 30, 2021
2 parents 99eadbf + 6c4b997 commit fbe66b0
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 fbe66b0

Please sign in to comment.