Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix 'generator object is not subscriptable' error #7290

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/7290.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move catchup of replication streams logic to worker.
3 changes: 2 additions & 1 deletion synapse/replication/tcp/streams/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ async def update_function(from_token, upto_token, limit):
updates = [(row[0], row[1:]) for row in rows]
limited = False
if len(updates) == limit:
upto_token = rows[-1][0]
upto_token = updates[-1][0]
limited = True
assert len(updates) <= limit

return updates, upto_token, limited

Expand Down