summary refs log tree commit diff
path: root/synapse/push/action_generator.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-19 16:16:05 +0000
committerErik Johnston <erik@matrix.org>2016-01-19 16:16:05 +0000
commit40d9765123463c9b14080b1f39dd1d21cc0c36eb (patch)
tree3d873a4aeb71913540fffc1bdebdf40a9ca47c4a /synapse/push/action_generator.py
parentHandle glob -> regex errors (diff)
parentUse split rather than endswith (diff)
downloadsynapse-40d9765123463c9b14080b1f39dd1d21cc0c36eb.tar.xz
Merge pull request #505 from matrix-org/erikj/push_fast
Push actions perf
Diffstat (limited to 'synapse/push/action_generator.py')
-rw-r--r--synapse/push/action_generator.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/push/action_generator.py b/synapse/push/action_generator.py
index 4cf94f6c61..1d2e558f9a 100644
--- a/synapse/push/action_generator.py
+++ b/synapse/push/action_generator.py
@@ -25,8 +25,9 @@ logger = logging.getLogger(__name__)
 
 
 class ActionGenerator:
-    def __init__(self, store):
-        self.store = store
+    def __init__(self, hs):
+        self.hs = hs
+        self.store = hs.get_datastore()
         # really we want to get all user ids and all profile tags too,
         # since we want the actions for each profile tag for every user and
         # also actions for a client with no profile tag for each user.
@@ -42,7 +43,7 @@ class ActionGenerator:
             )
 
         bulk_evaluator = yield bulk_push_rule_evaluator.evaluator_for_room_id(
-            event.room_id, self.store
+            event.room_id, self.hs, self.store
         )
 
         actions_by_user = yield bulk_evaluator.action_for_event_by_user(event, handler)