mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 21:04:59 -04:00
Replace uses of simple_insert_many with simple_insert_many_values. (#11742)
This should be (slightly) more efficient and it is simpler to have a single method for inserting multiple values.
This commit is contained in:
parent
d70169bf9b
commit
3e0536cd2a
19 changed files with 263 additions and 298 deletions
|
@ -561,13 +561,9 @@ class PusherStore(PusherWorkerStore):
|
|||
self.db_pool.simple_insert_many_txn(
|
||||
txn,
|
||||
table="deleted_pushers",
|
||||
keys=("stream_id", "app_id", "pushkey", "user_id"),
|
||||
values=[
|
||||
{
|
||||
"stream_id": stream_id,
|
||||
"app_id": pusher.app_id,
|
||||
"pushkey": pusher.pushkey,
|
||||
"user_id": user_id,
|
||||
}
|
||||
(stream_id, pusher.app_id, pusher.pushkey, user_id)
|
||||
for stream_id, pusher in zip(stream_ids, pushers)
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue