Rename get_tcp_replication to get_replication_command_handler. (#12192)

Since the object it returns is a ReplicationCommandHandler.

This is clean-up from adding support to Redis where the command handler
was added as an additional layer of abstraction from the TCP protocol.
This commit is contained in:
Patrick Cloke 2022-03-10 08:01:56 -05:00 committed by GitHub
parent a4c1fdb44a
commit 3e4af36bc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 20 additions and 19 deletions

View file

@ -44,7 +44,7 @@ class ReplicationStreamProtocolFactory(ServerFactory):
"""Factory for new replication connections."""
def __init__(self, hs: "HomeServer"):
self.command_handler = hs.get_tcp_replication()
self.command_handler = hs.get_replication_command_handler()
self.clock = hs.get_clock()
self.server_name = hs.config.server.server_name
@ -85,7 +85,7 @@ class ReplicationStreamer:
self.is_looping = False
self.pending_updates = False
self.command_handler = hs.get_tcp_replication()
self.command_handler = hs.get_replication_command_handler()
# Set of streams to replicate.
self.streams = self.command_handler.get_streams_to_replicate()