diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-08-26 14:31:48 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-08-26 14:36:03 +0100 |
commit | 4b2ad549d5a1dcf5c05f890c0383626d6c042fd0 (patch) | |
tree | 8aec582555ff9c4551cfd50c3808ab6f313ac4bf /synapse/storage/room.py | |
parent | Take a snapshot of the state of the room before performing updates (diff) | |
download | synapse-4b2ad549d5a1dcf5c05f890c0383626d6c042fd0.tar.xz |
Move the event storage into a single transaction
Diffstat (limited to 'synapse/storage/room.py')
-rw-r--r-- | synapse/storage/room.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/storage/room.py b/synapse/storage/room.py index 22f2dcca45..1ae3220197 100644 --- a/synapse/storage/room.py +++ b/synapse/storage/room.py @@ -131,8 +131,9 @@ class RoomStore(SQLBaseStore): defer.returnValue(ret) - def _store_room_topic(self, event): - return self._simple_insert( + def _store_room_topic_txn(self, txn, event): + self._simple_insert_txn( + txn, "topics", { "event_id": event.event_id, @@ -141,8 +142,9 @@ class RoomStore(SQLBaseStore): } ) - def _store_room_name(self, event): - return self._simple_insert( + def _store_room_name_txn(self, txn, event): + self._simple_insert_txn( + txn, "room_names", { "event_id": event.event_id, |