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

@ -424,13 +424,13 @@ class WorkerPresenceHandler(BasePresenceHandler):
async def _on_shutdown(self) -> None:
if self._presence_enabled:
self.hs.get_tcp_replication().send_command(
self.hs.get_replication_command_handler().send_command(
ClearUserSyncsCommand(self.instance_id)
)
def send_user_sync(self, user_id: str, is_syncing: bool, last_sync_ms: int) -> None:
if self._presence_enabled:
self.hs.get_tcp_replication().send_user_sync(
self.hs.get_replication_command_handler().send_user_sync(
self.instance_id, user_id, is_syncing, last_sync_ms
)