mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Push: Don't acquire lock unless necessary
This commit is contained in:
parent
91818723a1
commit
f60218ec41
@ -213,6 +213,10 @@ class RulesForRoom(object):
|
|||||||
"""
|
"""
|
||||||
state_group = context.state_group
|
state_group = context.state_group
|
||||||
|
|
||||||
|
if state_group and self.state_group == state_group:
|
||||||
|
logger.debug("Using cached rules for %r", self.room_id)
|
||||||
|
defer.returnValue(self.rules_by_user)
|
||||||
|
|
||||||
with (yield self.linearizer.queue(())):
|
with (yield self.linearizer.queue(())):
|
||||||
if state_group and self.state_group == state_group:
|
if state_group and self.state_group == state_group:
|
||||||
logger.debug("Using cached rules for %r", self.room_id)
|
logger.debug("Using cached rules for %r", self.room_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user