Remove Generator in _quarantine_media_txn() (#17813)

This commit is contained in:
Jason Little 2024-10-30 19:34:11 -05:00 committed by GitHub
parent 3ae80b0de4
commit 7987d5e638
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

1
changelog.d/17813.bugfix Normal file
View file

@ -0,0 +1 @@
Avoid lost data on some database query retries.

View file

@ -1175,7 +1175,7 @@ class RoomWorkerStore(CacheInvalidationWorkerStore):
SET quarantined_by = ?
WHERE media_origin = ? AND media_id = ?
""",
((quarantined_by, origin, media_id) for origin, media_id in remote_mxcs),
[(quarantined_by, origin, media_id) for origin, media_id in remote_mxcs],
)
total_media_quarantined += txn.rowcount if txn.rowcount > 0 else 0