mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 05:05:05 -04:00
Add type hints to expiring cache. (#9730)
This commit is contained in:
parent
024f121b74
commit
44bb881096
8 changed files with 65 additions and 54 deletions
|
@ -631,7 +631,7 @@ class DeviceListUpdater:
|
|||
max_len=10000,
|
||||
expiry_ms=30 * 60 * 1000,
|
||||
iterable=True,
|
||||
)
|
||||
) # type: ExpiringCache[str, Set[str]]
|
||||
|
||||
# Attempt to resync out of sync device lists every 30s.
|
||||
self._resync_retry_in_progress = False
|
||||
|
@ -760,7 +760,7 @@ class DeviceListUpdater:
|
|||
"""Given a list of updates for a user figure out if we need to do a full
|
||||
resync, or whether we have enough data that we can just apply the delta.
|
||||
"""
|
||||
seen_updates = self._seen_updates.get(user_id, set())
|
||||
seen_updates = self._seen_updates.get(user_id, set()) # type: Set[str]
|
||||
|
||||
extremity = await self.store.get_device_list_last_stream_id_for_remote(user_id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue