diff options
author | Erik Johnston <erik@matrix.org> | 2020-03-23 14:56:22 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2020-03-23 14:56:22 +0000 |
commit | a2070a2c4e008ceff6decce3d569f984d5e0f902 (patch) | |
tree | 15a1a225d246466564724c9f86708ed452765b19 /synapse | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/catchup_on... (diff) | |
download | synapse-a2070a2c4e008ceff6decce3d569f984d5e0f902.tar.xz |
Remove unused 'stream' param of REPLICATE and update docs
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/replication/tcp/commands.py | 17 | ||||
-rw-r--r-- | synapse/replication/tcp/protocol.py | 6 |
2 files changed, 8 insertions, 15 deletions
diff --git a/synapse/replication/tcp/commands.py b/synapse/replication/tcp/commands.py index e506f52935..b0f06c6d83 100644 --- a/synapse/replication/tcp/commands.py +++ b/synapse/replication/tcp/commands.py @@ -179,29 +179,24 @@ class NameCommand(Command): class ReplicateCommand(Command): - """Sent by the client to subscribe to the stream. + """Sent by the client to subscribe to streams. Format:: - REPLICATE <stream_name> - - The <stream_name> can be "ALL" to subscribe to all known streams + REPLICATE """ NAME = "REPLICATE" - def __init__(self, stream_name): - self.stream_name = stream_name + def __init__(self): + pass @classmethod def from_line(cls, line): - return cls(line) + return cls() def to_line(self): - return self.stream_name - - def get_logcontext_id(self): - return "REPLICATE-" + self.stream_name + return "" class UserSyncCommand(Command): diff --git a/synapse/replication/tcp/protocol.py b/synapse/replication/tcp/protocol.py index b371d66ce7..13e5fa9b12 100644 --- a/synapse/replication/tcp/protocol.py +++ b/synapse/replication/tcp/protocol.py @@ -35,9 +35,7 @@ indicate which side is sending, these are *not* included on the wire:: > PING 1490197665618 < NAME synapse.app.appservice < PING 1490197665618 - < REPLICATE events 1 - < REPLICATE backfill 1 - < REPLICATE caches 1 + < REPLICATE > POSITION events 1 > POSITION backfill 1 > POSITION caches 1 @@ -662,7 +660,7 @@ class ClientReplicationStreamProtocol(BaseReplicationStreamProtocol): """ logger.info("[%s] Subscribing to replication streams", self.id()) - self.send_command(ReplicateCommand("ALL")) + self.send_command(ReplicateCommand()) def on_connection_closed(self): BaseReplicationStreamProtocol.on_connection_closed(self) |