summary refs log tree commit diff
path: root/synapse/util/distributor.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-07-18 14:35:24 +0100
committerRichard van der Hoff <richard@matrix.org>2018-07-18 20:55:05 +0100
commit667fba68f3ca808f48143a2a739a54665b0162c6 (patch)
treebc180067772796f815877cfa5aefcd0a471fab9e /synapse/util/distributor.py
parentMerge pull request #3553 from matrix-org/rav/background_process_tracking (diff)
downloadsynapse-667fba68f3ca808f48143a2a739a54665b0162c6.tar.xz
Run things as background processes
This fixes #3518, and ensures that we get useful logs and metrics for lots of
things that happen in the background.

(There are certainly more things that happen in the background; these are just
the common ones I've found running a single-process synapse locally).
Diffstat (limited to 'synapse/util/distributor.py')
-rw-r--r--synapse/util/distributor.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/util/distributor.py b/synapse/util/distributor.py
index 734331caaa..d91ae400eb 100644
--- a/synapse/util/distributor.py
+++ b/synapse/util/distributor.py
@@ -75,6 +75,10 @@ class Distributor(object):
             self.pre_registration[name].append(observer)
 
     def fire(self, name, *args, **kwargs):
+        """Dispatches the given signal to the registered observers.
+
+        Runs the observers as a background process. Does not return a deferred.
+        """
         if name not in self.signals:
             raise KeyError("%r does not have a signal named %s" % (self, name))