summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-19 11:33:03 +0100
committerErik Johnston <erik@matrix.org>2019-06-19 11:33:03 +0100
commit554609288b0fc5f36d9dd9c45a939e7c81698b12 (patch)
tree1c8632c578fcf69abb3595c8234d1502803e7709 /synapse/handlers
parentNewsfile (diff)
downloadsynapse-554609288b0fc5f36d9dd9c45a939e7c81698b12.tar.xz
Run as background process and fix comments
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/message.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 3b5942b7ae..7728ea230d 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -34,6 +34,7 @@ from synapse.api.errors import (
 from synapse.api.room_versions import RoomVersions
 from synapse.api.urls import ConsentURIBuilder
 from synapse.events.validator import EventValidator
+from synapse.metrics.background_process_metrics import run_as_background_process
 from synapse.replication.http.send_event import ReplicationSendEventRestServlet
 from synapse.storage.state import StateFilter
 from synapse.types import RoomAlias, UserID, create_requester
@@ -265,9 +266,11 @@ class EventCreationHandler(object):
             not self.config.worker_app
             and self.config.cleanup_extremities_with_dummy_events
         ):
-            # XXX: Send dummy events.
             self.clock.looping_call(
-                self._send_dummy_events_to_fill_extremities,
+                lambda: run_as_background_process(
+                    "send_dummy_events_to_fill_extremities",
+                    self._send_dummy_events_to_fill_extremities
+                ),
                 5 * 60 * 1000,
             )