summary refs log tree commit diff
diff options
context:
space:
mode:
authorTravis Ralston <travpc@gmail.com>2018-11-22 08:50:05 -0700
committerTravis Ralston <travpc@gmail.com>2018-11-22 08:50:05 -0700
commit921469383e73efd15a75663b71046f7692877411 (patch)
tree961a469394c10ad0359c0db803a71348e830cd51
parentSafer execution (diff)
downloadsynapse-921469383e73efd15a75663b71046f7692877411.tar.xz
Use run_as_background_process
-rw-r--r--synapse/handlers/federation.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 12eed15865..9848534120 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -48,6 +48,7 @@ from synapse.crypto.event_signing import (
     compute_event_signature,
 )
 from synapse.events.validator import EventValidator
+from synapse.metrics.background_process_metrics import run_as_background_process
 from synapse.replication.http.federation import (
     ReplicationCleanRoomRestServlet,
     ReplicationFederationSendEventsRestServlet,
@@ -1304,7 +1305,8 @@ class FederationHandler(BaseHandler):
         sender = UserID.from_string(event.sender)
         target = UserID.from_string(event.state_key)
         if (sender.localpart == target.localpart):
-            logcontext.run_in_background(
+            run_as_background_process(
+                "_auto_accept_invite",
                 self._auto_accept_invite,
                 sender, target, event.room_id,
             )