summary refs log tree commit diff
path: root/synapse/replication/tcp/commands.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-08-03 17:28:09 -0700
committerAndrew Morgan <andrew@amorgan.xyz>2020-08-03 17:28:09 -0700
commitbf6cf4b6512ce2553e34932de0de18ec994cfd39 (patch)
tree45c499f7a24908324029fc1ba0c5ce065b1c127f /synapse/replication/tcp/commands.py
parentMerge commit 'f1245dc3c' into anoa/dinsic_release_1_18_x (diff)
parentAdd ability to shard the federation sender (#7798) (diff)
downloadsynapse-bf6cf4b6512ce2553e34932de0de18ec994cfd39.tar.xz
Merge commit 'f299441cc' into anoa/dinsic_release_1_18_x
* commit 'f299441cc':
  Add ability to shard the federation sender (#7798)
Diffstat (limited to 'synapse/replication/tcp/commands.py')
-rw-r--r--synapse/replication/tcp/commands.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/replication/tcp/commands.py b/synapse/replication/tcp/commands.py

index ccc7f1f0d1..f33801f883 100644 --- a/synapse/replication/tcp/commands.py +++ b/synapse/replication/tcp/commands.py
@@ -293,20 +293,22 @@ class FederationAckCommand(Command): Format:: - FEDERATION_ACK <token> + FEDERATION_ACK <instance_name> <token> """ NAME = "FEDERATION_ACK" - def __init__(self, token): + def __init__(self, instance_name, token): + self.instance_name = instance_name self.token = token @classmethod def from_line(cls, line): - return cls(int(line)) + instance_name, token = line.split(" ") + return cls(instance_name, int(token)) def to_line(self): - return str(self.token) + return "%s %s" % (self.instance_name, self.token) class RemovePusherCommand(Command):