summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-09-20 16:15:21 +0100
committerErik Johnston <erik@matrix.org>2018-09-20 16:15:21 +0100
commit9ea408441f527064aeafb5a7076a10a15f2c580c (patch)
tree78e3d4ecdb7e270129d9322a7f82c1b0f4f25154 /synapse
parentMerge pull request #3914 from matrix-org/erikj/remove_retry_cache (diff)
downloadsynapse-9ea408441f527064aeafb5a7076a10a15f2c580c.tar.xz
Handle exceptions thrown by background tasks
Fixes #3921
Diffstat (limited to 'synapse')
-rw-r--r--synapse/metrics/background_process_metrics.py2
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()