mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
switch missing_types to be a bool
This commit is contained in:
parent
2565804030
commit
bc7944e6d2
@ -511,8 +511,8 @@ class StateGroupWorkerStore(SQLBaseStore):
|
|||||||
|
|
||||||
type_to_key = {}
|
type_to_key = {}
|
||||||
|
|
||||||
# tracks which of the requested types are missing from our cache
|
# tracks whether any of ourrequested types are missing from the cache
|
||||||
missing_types = set()
|
missing_types = False
|
||||||
|
|
||||||
for typ, state_key in types:
|
for typ, state_key in types:
|
||||||
key = (typ, state_key)
|
key = (typ, state_key)
|
||||||
@ -526,13 +526,13 @@ class StateGroupWorkerStore(SQLBaseStore):
|
|||||||
# when the cache was populated it might have been done with a
|
# when the cache was populated it might have been done with a
|
||||||
# restricted set of state_keys, so the wildcard will not work
|
# restricted set of state_keys, so the wildcard will not work
|
||||||
# and the cache may be incomplete.
|
# and the cache may be incomplete.
|
||||||
missing_types.add(key)
|
missing_types = True
|
||||||
else:
|
else:
|
||||||
if type_to_key.get(typ, object()) is not None:
|
if type_to_key.get(typ, object()) is not None:
|
||||||
type_to_key.setdefault(typ, set()).add(state_key)
|
type_to_key.setdefault(typ, set()).add(state_key)
|
||||||
|
|
||||||
if key not in state_dict_ids and key not in known_absent:
|
if key not in state_dict_ids and key not in known_absent:
|
||||||
missing_types.add(key)
|
missing_types = True
|
||||||
|
|
||||||
sentinel = object()
|
sentinel = object()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user