diff options
author | David Baker <dbkr@users.noreply.github.com> | 2016-04-11 12:58:55 +0100 |
---|---|---|
committer | David Baker <dbkr@users.noreply.github.com> | 2016-04-11 12:58:55 +0100 |
commit | 2547dffccc2f2ead7e0d35dafd6da5d468e6d1d8 (patch) | |
tree | 76c9b510bdb25556553c0cbfa7072e36d11f7e75 /synapse/storage/events.py | |
parent | PEP8 (diff) | |
parent | Run unsafe proces in a loop until we've caught up (diff) | |
download | synapse-2547dffccc2f2ead7e0d35dafd6da5d468e6d1d8.tar.xz |
Merge pull request #705 from matrix-org/dbkr/pushers_use_event_actions
Change pushers to use the event_actions table
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index ee87a71719..308a2c9b02 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,9 @@ 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,)) |