diff options
author | Erik Johnston <erik@matrix.org> | 2018-09-20 16:15:21 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-09-20 16:15:21 +0100 |
commit | 9ea408441f527064aeafb5a7076a10a15f2c580c (patch) | |
tree | 78e3d4ecdb7e270129d9322a7f82c1b0f4f25154 /synapse/metrics | |
parent | Merge pull request #3914 from matrix-org/erikj/remove_retry_cache (diff) | |
download | synapse-9ea408441f527064aeafb5a7076a10a15f2c580c.tar.xz |
Handle exceptions thrown by background tasks
Fixes #3921
Diffstat (limited to 'synapse/metrics')
-rw-r--r-- | synapse/metrics/background_process_metrics.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/metrics/background_process_metrics.py b/synapse/metrics/background_process_metrics.py index 167167be0a..e5293587e3 100644 --- a/synapse/metrics/background_process_metrics.py +++ b/synapse/metrics/background_process_metrics.py @@ -191,6 +191,8 @@ def run_as_background_process(desc, func, *args, **kwargs): try: yield func(*args, **kwargs) + except Exception: + logger.exception("Background process '%s' threw an exception", desc) finally: proc.update_metrics() |