Skip to content

Commit bf105d2

Browse files
committed
Add a custom __repr__ to RdataCommand for easier debugging
1 parent 7ed5566 commit bf105d2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

synapse/replication/tcp/commands.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ def __init__(
144144
self.token = token
145145
self.row = row
146146

147+
def __repr__(self) -> str:
148+
return f"RdataCommand(stream={self.stream_name!r}, instance={self.instance_name!r}, position={self.token!r}, row=...)"
149+
147150
@classmethod
148151
def from_line(cls: Type["RdataCommand"], line: str) -> "RdataCommand":
149152
stream_name, instance_name, token, row_json = line.split(" ", 3)

0 commit comments

Comments
 (0)