diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-03-09 10:29:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 15:29:39 +0000 |
commit | 032688854babeea832cbb4f762fc70fe31e73cc6 (patch) | |
tree | bc257a2b40bc9f3574ec199cf8b22faad9007098 /synapse | |
parent | Retry some http replication failures (#12182) (diff) | |
download | synapse-032688854babeea832cbb4f762fc70fe31e73cc6.tar.xz |
Remove some unused variables/parameters. (#12187)
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/databases/main/roommember.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/synapse/storage/databases/main/roommember.py b/synapse/storage/databases/main/roommember.py index e48ec5f495..bef675b845 100644 --- a/synapse/storage/databases/main/roommember.py +++ b/synapse/storage/databases/main/roommember.py @@ -46,7 +46,7 @@ from synapse.storage.roommember import ( ProfileInfo, RoomsForUser, ) -from synapse.types import PersistedEventPosition, StateMap, get_domain_from_id +from synapse.types import PersistedEventPosition, get_domain_from_id from synapse.util.async_helpers import Linearizer from synapse.util.caches import intern_string from synapse.util.caches.descriptors import _CacheContext, cached, cachedList @@ -273,7 +273,7 @@ class RoomMemberWorkerStore(EventsWorkerStore): txn.execute(sql, (room_id,)) res = {} for count, membership in txn: - summary = res.setdefault(membership, MemberSummary([], count)) + res.setdefault(membership, MemberSummary([], count)) # we order by membership and then fairly arbitrarily by event_id so # heroes are consistent @@ -839,18 +839,14 @@ class RoomMemberWorkerStore(EventsWorkerStore): with Measure(self._clock, "get_joined_hosts"): return await self._get_joined_hosts( - room_id, state_group, state_entry.state, state_entry=state_entry + room_id, state_group, state_entry=state_entry ) @cached(num_args=2, max_entries=10000, iterable=True) async def _get_joined_hosts( - self, - room_id: str, - state_group: int, - current_state_ids: StateMap[str], - state_entry: "_StateCacheEntry", + self, room_id: str, state_group: int, state_entry: "_StateCacheEntry" ) -> FrozenSet[str]: - # We don't use `state_group`, its there so that we can cache based on + # We don't use `state_group`, it's there so that we can cache based on # it. However, its important that its never None, since two # current_state's with a state_group of None are likely to be different. # |