diff options
author | Travis Ralston <travpc@gmail.com> | 2018-10-12 14:49:58 -0600 |
---|---|---|
committer | Travis Ralston <travpc@gmail.com> | 2018-10-12 14:49:58 -0600 |
commit | e3586f7c06f3c779e87f9ea3bf4e4ac549a451c9 (patch) | |
tree | 2ef1ecdb2f2c6641a81a47adf51fda62343be7e3 /synapse/handlers/appservice.py | |
parent | Remove debugging statement (diff) | |
parent | Make workers work on Py3 (#4027) (diff) | |
download | synapse-e3586f7c06f3c779e87f9ea3bf4e4ac549a451c9.tar.xz |
Merge branch 'develop' into travis/fix-federated-group-requests
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r-- | synapse/handlers/appservice.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index f0f89af7dc..17eedf4dbf 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 log_failure from synapse.util.logcontext import make_deferred_yieldable, run_in_background from synapse.util.metrics import Measure @@ -36,17 +37,6 @@ logger = logging.getLogger(__name__) events_processed_counter = Counter("synapse_handlers_appservice_events_processed", "") -def log_failure(failure): - logger.error( - "Application Services Failure", - exc_info=( - failure.type, - failure.value, - failure.getTracebackObject() - ) - ) - - class ApplicationServicesHandler(object): def __init__(self, hs): @@ -112,7 +102,10 @@ class ApplicationServicesHandler(object): if not self.started_scheduler: def start_scheduler(): - return self.scheduler.start().addErrback(log_failure) + return self.scheduler.start().addErrback( + log_failure, "Application Services Failure", + ) + run_as_background_process("as_scheduler", start_scheduler) self.started_scheduler = True |