summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-07-30 07:27:39 -0400
committerGitHub <noreply@github.com>2020-07-30 07:27:39 -0400
commit4cce8ef74ec233d8e49361bee705f2e38de2e11e (patch)
tree350a0b76a92808ad123e2276ed40a8c79d161e4c /synapse/handlers
parentConvert some of the data store to async. (#7976) (diff)
downloadsynapse-4cce8ef74ec233d8e49361bee705f2e38de2e11e.tar.xz
Convert appservice to async. (#7973)
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/appservice.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index 92d4c6e16c..fbc56c351b 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -27,7 +27,6 @@ from synapse.metrics import (
     event_processing_loop_room_count,
 )
 from synapse.metrics.background_process_metrics import run_as_background_process
-from synapse.util import log_failure
 from synapse.util.metrics import Measure
 
 logger = logging.getLogger(__name__)
@@ -100,10 +99,11 @@ class ApplicationServicesHandler(object):
 
                         if not self.started_scheduler:
 
-                            def start_scheduler():
-                                return self.scheduler.start().addErrback(
-                                    log_failure, "Application Services Failure"
-                                )
+                            async def start_scheduler():
+                                try:
+                                    return self.scheduler.start()
+                                except Exception:
+                                    logger.error("Application Services Failure")
 
                             run_as_background_process("as_scheduler", start_scheduler)
                             self.started_scheduler = True