summary refs log tree commit diff
path: root/synapse/replication/tcp/commands.py
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2022-04-01 13:08:55 +0100
committerGitHub <noreply@github.com>2022-04-01 13:08:55 +0100
commitf8712228801d9c4753e65819fa4241818b56953b (patch)
treefffb61404df1fe81c8598a1ac4b7d37c62747638 /synapse/replication/tcp/commands.py
parentRaise an exception when getting state at an outlier (#12191) (diff)
downloadsynapse-f8712228801d9c4753e65819fa4241818b56953b.tar.xz
Move `update_client_ip` background job from the main process to the background worker. (#12251)
Diffstat (limited to 'synapse/replication/tcp/commands.py')
-rw-r--r--synapse/replication/tcp/commands.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/replication/tcp/commands.py b/synapse/replication/tcp/commands.py
index 3654f6c03c..fe34948168 100644
--- a/synapse/replication/tcp/commands.py
+++ b/synapse/replication/tcp/commands.py
@@ -356,7 +356,7 @@ class UserIpCommand(Command):
         access_token: str,
         ip: str,
         user_agent: str,
-        device_id: str,
+        device_id: Optional[str],
         last_seen: int,
     ):
         self.user_id = user_id
@@ -389,6 +389,12 @@ class UserIpCommand(Command):
             )
         )
 
+    def __repr__(self) -> str:
+        return (
+            f"UserIpCommand({self.user_id!r}, .., {self.ip!r}, "
+            f"{self.user_agent!r}, {self.device_id!r}, {self.last_seen})"
+        )
+
 
 class RemoteServerUpCommand(_SimpleCommand):
     """Sent when a worker has detected that a remote server is no longer