diff options
author | Erik Johnston <erik@matrix.org> | 2021-01-21 14:44:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-21 14:44:12 +0000 |
commit | 7a43482f1916622967f5a4b389f93944dd5deb07 (patch) | |
tree | 067807264e4296afce13edae43743bc0ee281928 /synapse/storage/databases/main/devices.py | |
parent | Add tests for List Users Admin API (#9045) (diff) | |
download | synapse-7a43482f1916622967f5a4b389f93944dd5deb07.tar.xz |
Use execute_batch in more places (#9188)
* Use execute_batch in more places * Newsfile
Diffstat (limited to 'synapse/storage/databases/main/devices.py')
-rw-r--r-- | synapse/storage/databases/main/devices.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/devices.py b/synapse/storage/databases/main/devices.py index 9097677648..659d8f245f 100644 --- a/synapse/storage/databases/main/devices.py +++ b/synapse/storage/databases/main/devices.py @@ -897,7 +897,7 @@ class DeviceWorkerStore(SQLBaseStore): DELETE FROM device_lists_outbound_last_success WHERE destination = ? AND user_id = ? """ - txn.executemany(sql, ((row[0], row[1]) for row in rows)) + txn.execute_batch(sql, ((row[0], row[1]) for row in rows)) logger.info("Pruned %d device list outbound pokes", count) @@ -1343,7 +1343,7 @@ class DeviceStore(DeviceWorkerStore, DeviceBackgroundUpdateStore): # Delete older entries in the table, as we really only care about # when the latest change happened. - txn.executemany( + txn.execute_batch( """ DELETE FROM device_lists_stream WHERE user_id = ? AND device_id = ? AND stream_id < ? |