diff options
author | Erik Johnston <erik@matrix.org> | 2016-01-19 16:16:05 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-01-19 16:16:05 +0000 |
commit | 40d9765123463c9b14080b1f39dd1d21cc0c36eb (patch) | |
tree | 3d873a4aeb71913540fffc1bdebdf40a9ca47c4a /synapse/push/action_generator.py | |
parent | Handle glob -> regex errors (diff) | |
parent | Use split rather than endswith (diff) | |
download | synapse-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.py | 7 |
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) |