mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-08-01 08:46:03 -04:00
Use execute_batch in more places (#9188)
* Use execute_batch in more places * Newsfile
This commit is contained in:
parent
c55e62548c
commit
7a43482f19
12 changed files with 26 additions and 31 deletions
|
@ -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 < ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue