Add regex cache. Only caculate push actions for users that have sent read receipts, and are on that server

This commit is contained in:
Erik Johnston 2016-01-19 16:01:05 +00:00
parent d056a0a3d8
commit 5a7d1ecffc
7 changed files with 50 additions and 14 deletions

View file

@ -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)