Handle exceptions thrown by background tasks

Fixes #3921
pull/14/head
Erik Johnston 6 years ago
parent 3fd68d533b
commit 9ea408441f
  1. 2
      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()

Loading…
Cancel
Save