mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-05 18:24:13 -04:00
Change EventContext to use the Storage class (#6564)
This commit is contained in:
parent
0b5dbadd96
commit
fa780e9721
15 changed files with 64 additions and 53 deletions
|
@ -116,7 +116,7 @@ class BulkPushRuleEvaluator(object):
|
|||
|
||||
@defer.inlineCallbacks
|
||||
def _get_power_levels_and_sender_level(self, event, context):
|
||||
prev_state_ids = yield context.get_prev_state_ids(self.store)
|
||||
prev_state_ids = yield context.get_prev_state_ids()
|
||||
pl_event_id = prev_state_ids.get(POWER_KEY)
|
||||
if pl_event_id:
|
||||
# fastpath: if there's a power level event, that's all we need, and
|
||||
|
@ -304,7 +304,7 @@ class RulesForRoom(object):
|
|||
|
||||
push_rules_delta_state_cache_metric.inc_hits()
|
||||
else:
|
||||
current_state_ids = yield context.get_current_state_ids(self.store)
|
||||
current_state_ids = yield context.get_current_state_ids()
|
||||
push_rules_delta_state_cache_metric.inc_misses()
|
||||
|
||||
push_rules_state_size_counter.inc(len(current_state_ids))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue