0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-16 08:43:53 +01:00

Don't shadow params

This commit is contained in:
Erik Johnston 2019-01-22 16:20:33 +00:00
parent c658425e6f
commit 1c9704f8ab

View file

@ -151,7 +151,7 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
else: else:
last = False last = False
def remove(txn, begin_last_seen, end_last_seen): def remove(txn):
# This works by looking at all entries in the given time span, and # This works by looking at all entries in the given time span, and
# then for each (user_id, access_token, ip) tuple in that range # then for each (user_id, access_token, ip) tuple in that range
# checking for any duplicates in the rest of the table (via a join). # checking for any duplicates in the rest of the table (via a join).
@ -204,9 +204,8 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
txn, "user_ips_remove_dupes", {"last_seen": end_last_seen} txn, "user_ips_remove_dupes", {"last_seen": end_last_seen}
) )
yield self.runInteraction( yield self.runInteraction("user_ips_dups_remove", remove)
"user_ips_dups_remove", remove, begin_last_seen, end_last_seen
)
if last: if last:
yield self._end_background_update("user_ips_remove_dupes") yield self._end_background_update("user_ips_remove_dupes")