From 7984708a555bd5ccdef713710325bf7bec27d970 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 27 Mar 2017 14:05:07 +0100 Subject: [PATCH] Add a simple hook to wait for replication traffic --- synapse/notifier.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/synapse/notifier.py b/synapse/notifier.py index 7eeba6d28..f9fcc0ca2 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()