summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-09-28 10:51:09 +0100
committerRichard van der Hoff <richard@matrix.org>2018-09-28 10:51:09 +0100
commit9c8cec5dab134cebd749021023858b55be2a7a0a (patch)
tree74484a28e7a8d258bb1fd312aff5dfa731327105 /synapse/notifier.py
parentMerge branch 'rav/fix_expiring_cache_len' into erikj/destination_retry_cache (diff)
parentMerge pull request #3794 from matrix-org/erikj/faster_typing (diff)
downloadsynapse-9c8cec5dab134cebd749021023858b55be2a7a0a.tar.xz
Merge remote-tracking branch 'origin/develop' into erikj/destination_retry_cache
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r--synapse/notifier.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index f1d92c1395..340b16ce25 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -24,9 +24,10 @@ from synapse.api.constants import EventTypes, Membership
 from synapse.api.errors import AuthError
 from synapse.handlers.presence import format_user_presence_state
 from synapse.metrics import LaterGauge
+from synapse.metrics.background_process_metrics import run_as_background_process
 from synapse.types import StreamToken
 from synapse.util.async_helpers import ObservableDeferred, timeout_deferred
-from synapse.util.logcontext import PreserveLoggingContext, run_in_background
+from synapse.util.logcontext import PreserveLoggingContext
 from synapse.util.logutils import log_function
 from synapse.util.metrics import Measure
 from synapse.visibility import filter_events_for_client
@@ -248,7 +249,10 @@ class Notifier(object):
     def _on_new_room_event(self, event, room_stream_id, extra_users=[]):
         """Notify any user streams that are interested in this room event"""
         # poke any interested application service.
-        run_in_background(self._notify_app_services, room_stream_id)
+        run_as_background_process(
+            "notify_app_services",
+            self._notify_app_services, room_stream_id,
+        )
 
         if self.federation_sender:
             self.federation_sender.notify_new_events(room_stream_id)