Skip to content
Snippets Groups Projects
Commit 67b7b904 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #2365 from matrix-org/erikj/push_skip_lock

Push: Don't acquire lock unless necessary
parents 91818723 f60218ec
No related branches found
No related tags found
No related merge requests found
......@@ -213,6 +213,10 @@ class RulesForRoom(object):
"""
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(())):
if state_group and self.state_group == state_group:
logger.debug("Using cached rules for %r", self.room_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment