diff options
author | David Baker <dave@matrix.org> | 2016-04-06 15:42:15 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-04-06 15:42:15 +0100 |
commit | 7e2c89a37f3a5261f43b4d472b36219ac41dfb16 (patch) | |
tree | e52d8d4683cc8229004f17b401a4c5b6e633391b /synapse/storage/events.py | |
parent | Merge pull request #691 from matrix-org/erikj/member (diff) | |
download | synapse-7e2c89a37f3a5261f43b4d472b36219ac41dfb16.tar.xz |
Make pushers use the event_push_actions table instead of listening on an event stream & running the rules again. Sytest passes, but remaining to do:
* Make badges work again * Remove old, unused code
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index 5d299a1132..ceae8715ce 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -61,6 +61,17 @@ class EventsStore(SQLBaseStore): @defer.inlineCallbacks def persist_events(self, events_and_contexts, backfilled=False): + """ + Write events to the database + Args: + events_and_contexts: list of tuples of (event, context) + backfilled: ? + + Returns: Tuple of stream_orderings where the first is the minimum and + last is the maximum stream ordering assigned to the events when + persisting. + + """ if not events_and_contexts: return @@ -191,6 +202,7 @@ class EventsStore(SQLBaseStore): txn.call_after(self._get_current_state_for_key.invalidate_all) txn.call_after(self.get_rooms_for_user.invalidate_all) txn.call_after(self.get_users_in_room.invalidate, (event.room_id,)) + txn.call_after(self.get_users_with_pushers_in_room.invalidate, (event.room_id,)) txn.call_after(self.get_joined_hosts_for_room.invalidate, (event.room_id,)) txn.call_after(self.get_room_name_and_aliases.invalidate, (event.room_id,)) |