Fix iteration in _remove_deleted_email_pushers background job. (#10734)

This commit is contained in:
Andrew Morgan 2021-09-01 10:13:01 +01:00 committed by GitHub
parent 78e590d473
commit 3693ea61f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 1 deletions

View file

@ -430,10 +430,11 @@ class PusherWorkerStore(SQLBaseStore):
"""
txn.execute(sql, (last_pusher, batch_size))
rows = txn.fetchall()
last = None
num_deleted = 0
for row in txn:
for row in rows:
last = row[0]
num_deleted += 1
self.db_pool.simple_delete_txn(