diff options
author | Erik Johnston <erik@matrix.org> | 2018-10-08 13:26:54 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-10-08 13:29:47 +0100 |
commit | 8a1817f0d29308a233783d43cbf1ad27891120c1 (patch) | |
tree | 264cfe50700bbeb62c129743f0f295b5f86e3a6e /synapse/handlers/appservice.py | |
parent | Newsfile (diff) | |
download | synapse-8a1817f0d29308a233783d43cbf1ad27891120c1.tar.xz |
Use errback pattern and catch async failures
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r-- | synapse/handlers/appservice.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index f0f89af7dc..16b897eb18 100644 --- a/synapse/handlers/appservice.py +++ b/synapse/handlers/appservice.py @@ -28,6 +28,7 @@ from synapse.metrics import ( event_processing_loop_room_count, ) from synapse.metrics.background_process_metrics import run_as_background_process +from synapse.util import make_log_failure_errback from synapse.util.logcontext import make_deferred_yieldable, run_in_background from synapse.util.metrics import Measure @@ -112,7 +113,11 @@ class ApplicationServicesHandler(object): if not self.started_scheduler: def start_scheduler(): - return self.scheduler.start().addErrback(log_failure) + return self.scheduler.start().addErrback( + make_log_failure_errback( + "Application Services Failure", + ) + ) run_as_background_process("as_scheduler", start_scheduler) self.started_scheduler = True |