diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-07-24 11:11:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 11:11:27 +0100 |
commit | 69292de6ccd294c224956de36f2bf424edd6e91a (patch) | |
tree | 2fbe0f15fe17c27664a6c4a7e0058e286bd6ed56 /synapse/handlers/appservice.py | |
parent | Merge pull request #3555 from matrix-org/erikj/client_apis_move (diff) | |
parent | Merge branch 'develop' into rav/logcontext_fixes (diff) | |
download | synapse-69292de6ccd294c224956de36f2bf424edd6e91a.tar.xz |
Merge pull request #3591 from matrix-org/rav/logcontext_fixes
Logcontext fixes
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r-- | synapse/handlers/appservice.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index ec9fe01a5a..ee41aed69e 100644 --- a/synapse/handlers/appservice.py +++ b/synapse/handlers/appservice.py @@ -23,6 +23,7 @@ from twisted.internet import defer import synapse from synapse.api.constants import EventTypes +from synapse.metrics.background_process_metrics import run_as_background_process from synapse.util.logcontext import make_deferred_yieldable, run_in_background from synapse.util.metrics import Measure @@ -106,7 +107,9 @@ class ApplicationServicesHandler(object): yield self._check_user_exists(event.state_key) if not self.started_scheduler: - self.scheduler.start().addErrback(log_failure) + def start_scheduler(): + return self.scheduler.start().addErrback(log_failure) + run_as_background_process("as_scheduler", start_scheduler) self.started_scheduler = True # Fork off pushes to these services |