diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-11-07 16:47:45 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-11-07 16:47:45 +0000 |
commit | c9b27d00445f84ebfbd4115e3177a10513aadcfc (patch) | |
tree | db0a9b89fd86c42cb91a284199b5792382d797ab /synapse/storage | |
parent | Revert "Back to using cursor_to_dict" (diff) | |
download | synapse-c9b27d00445f84ebfbd4115e3177a10513aadcfc.tar.xz |
Copy results
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/data_stores/main/events_bg_updates.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/data_stores/main/events_bg_updates.py b/synapse/storage/data_stores/main/events_bg_updates.py index bee8c9cfa0..a4cb64f479 100644 --- a/synapse/storage/data_stores/main/events_bg_updates.py +++ b/synapse/storage/data_stores/main/events_bg_updates.py @@ -525,9 +525,11 @@ class EventsBackgroundUpdatesStore(BackgroundUpdateStore): (last_event_id, batch_size), ) + results = list(txn) + nbrows = 0 last_row_event_id = "" - for (event_id, event_json_raw) in txn: + for (event_id, event_json_raw) in results: event_json = json.loads(event_json_raw) self._simple_insert_many_txn( |