mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 01:02:13 -04:00
Change Cache to not use *args in its interface
This commit is contained in:
parent
63b1eaf32c
commit
20addfa358
11 changed files with 69 additions and 67 deletions
|
@ -99,7 +99,7 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||
key = (user.to_string(), access_token, device_id, ip)
|
||||
|
||||
try:
|
||||
last_seen = self.client_ip_last_seen.get(*key)
|
||||
last_seen = self.client_ip_last_seen.get(key)
|
||||
except KeyError:
|
||||
last_seen = None
|
||||
|
||||
|
@ -107,7 +107,7 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||
if last_seen is not None and (now - last_seen) < LAST_SEEN_GRANULARITY:
|
||||
defer.returnValue(None)
|
||||
|
||||
self.client_ip_last_seen.prefill(*key + (now,))
|
||||
self.client_ip_last_seen.prefill(key, now)
|
||||
|
||||
# It's safe not to lock here: a) no unique constraint,
|
||||
# b) LAST_SEEN_GRANULARITY makes concurrent updates incredibly unlikely
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue