Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Handle exceptions thrown by background tasks
Browse files Browse the repository at this point in the history
Fixes #3921
  • Loading branch information
erikjohnston committed Sep 20, 2018
1 parent 3fd68d5 commit 9ea4084
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions synapse/metrics/background_process_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ def run():

try:
yield func(*args, **kwargs)
except Exception:
logger.exception("Background process '%s' threw an exception", desc)
finally:
proc.update_metrics()

Expand Down

0 comments on commit 9ea4084

Please sign in to comment.