Skip to content

Commit

Permalink
Emit a metric when pghoard quits main loop
Browse files Browse the repository at this point in the history
for example: for alerting purpose
  • Loading branch information
Aiqin-Aiven committed Sep 18, 2023
1 parent 21bc214 commit 5da3474
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pghoard/pghoard.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ def run(self):
self.metrics.unexpected_exception(ex, where="pghoard_run")
if self.thread_critical_failure_event.wait(timeout=5.0):
self.log.error("Unexpected critical failure in PGHoard thread. Quitting main loop.")
self.metrics.increase("pghoard.unrecoverable_quit_main_loop_failure")
self.quit()

def write_backup_state_to_json_file(self):
Expand Down

0 comments on commit 5da3474

Please sign in to comment.