Move the event storage into a single transaction

This commit is contained in:
Mark Haines 2014-08-26 14:31:48 +01:00
parent 1379dcae6f
commit 4b2ad549d5
6 changed files with 60 additions and 48 deletions

View file

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