summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-03-27 14:05:07 +0100
committerErik Johnston <erik@matrix.org>2017-03-30 11:57:52 +0100
commit7984708a555bd5ccdef713710325bf7bec27d970 (patch)
tree4fa566c08171d1218a6bcb068248eb9136c89b6f /synapse/notifier.py
parentAdd new storage functions for new replication (diff)
downloadsynapse-7984708a555bd5ccdef713710325bf7bec27d970.tar.xz
Add a simple hook to wait for replication traffic
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r--synapse/notifier.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index 7eeba6d28e..f9fcc0ca25 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -550,3 +550,9 @@ class Notifier(object):
                 break
 
         defer.returnValue(result)
+
+    def wait_once_for_replication(self):
+        """Returns a deferred which resolves when there is new data for
+        replication to handle.
+        """
+        return self.replication_deferred.observe()