From bf105d22f4fb67161310fe2bcce906c8d61a6dd5 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Mon, 4 Aug 2025 18:03:25 +0200 Subject: [PATCH] Add a custom __repr__ to RdataCommand for easier debugging --- synapse/replication/tcp/commands.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/synapse/replication/tcp/commands.py b/synapse/replication/tcp/commands.py index 6ab5356660..962acf2d87 100644 --- a/synapse/replication/tcp/commands.py +++ b/synapse/replication/tcp/commands.py @@ -144,6 +144,9 @@ class RdataCommand(Command): self.token = token self.row = row + def __repr__(self) -> str: + return f"RdataCommand(stream={self.stream_name!r}, instance={self.instance_name!r}, position={self.token!r}, row=...)" + @classmethod def from_line(cls: Type["RdataCommand"], line: str) -> "RdataCommand": stream_name, instance_name, token, row_json = line.split(" ", 3)