diff options
author | Erik Johnston <erikj@jki.re> | 2017-04-05 09:36:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-05 09:36:21 +0100 |
commit | a5c401bd12fd4aab08df5c2fa74ec469760a9c1d (patch) | |
tree | cabfe2496262251db0cef9bbb69143839643b940 /synapse/replication/slave/storage/pushers.py | |
parent | Merge pull request #2099 from matrix-org/erikj/deviceinbox_reduce (diff) | |
parent | Add comment (diff) | |
download | synapse-a5c401bd12fd4aab08df5c2fa74ec469760a9c1d.tar.xz |
Merge pull request #2097 from matrix-org/erikj/repl_tcp_client
Move to using TCP replication
Diffstat (limited to 'synapse/replication/slave/storage/pushers.py')
-rw-r--r-- | synapse/replication/slave/storage/pushers.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/synapse/replication/slave/storage/pushers.py b/synapse/replication/slave/storage/pushers.py index d88206b3bb..4e8d68ece9 100644 --- a/synapse/replication/slave/storage/pushers.py +++ b/synapse/replication/slave/storage/pushers.py @@ -40,13 +40,9 @@ class SlavedPusherStore(BaseSlavedStore): result["pushers"] = self._pushers_id_gen.get_current_token() return result - def process_replication(self, result): - stream = result.get("pushers") - if stream: - self._pushers_id_gen.advance(int(stream["position"])) - - stream = result.get("deleted_pushers") - if stream: - self._pushers_id_gen.advance(int(stream["position"])) - - return super(SlavedPusherStore, self).process_replication(result) + def process_replication_rows(self, stream_name, token, rows): + if stream_name == "pushers": + self._pushers_id_gen.advance(token) + return super(SlavedPusherStore, self).process_replication_rows( + stream_name, token, rows + ) |