diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-03-27 21:12:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-27 21:12:36 +0000 |
commit | acaa18f7dd0d12dec5742e64705f9bf3c45abffe (patch) | |
tree | 55c884920ca037fafd1a0c3f9185b68ac3856c94 /synapse/replication/tcp/streams.py | |
parent | Support 3PID login in password providers (#4931) (diff) | |
download | synapse-acaa18f7dd0d12dec5742e64705f9bf3c45abffe.tar.xz |
Fix/improve some docstrings in the replication code. (#4949)
Diffstat (limited to 'synapse/replication/tcp/streams.py')
-rw-r--r-- | synapse/replication/tcp/streams.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/synapse/replication/tcp/streams.py b/synapse/replication/tcp/streams.py index e23084baae..42b8a25bd3 100644 --- a/synapse/replication/tcp/streams.py +++ b/synapse/replication/tcp/streams.py @@ -162,8 +162,10 @@ class Stream(object): until the `upto_token` Returns: - (list(ROW_TYPE), int): list of updates plus the token used as an - upper bound of the updates (i.e. the "current token") + Deferred[Tuple[List[Tuple[int, Any]], int]: + Resolves to a pair ``(updates, current_token)``, where ``updates`` is a + list of ``(token, row)`` entries. ``row`` will be json-serialised and + sent over the replication steam. """ updates, current_token = yield self.get_updates_since(self.last_token) self.last_token = current_token @@ -176,8 +178,10 @@ class Stream(object): stream updates Returns: - (list(ROW_TYPE), int): list of updates plus the token used as an - upper bound of the updates (i.e. the "current token") + Deferred[Tuple[List[Tuple[int, Any]], int]: + Resolves to a pair ``(updates, current_token)``, where ``updates`` is a + list of ``(token, row)`` entries. ``row`` will be json-serialised and + sent over the replication steam. """ if from_token in ("NOW", "now"): defer.returnValue(([], self.upto_token)) |