mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Convert get_rooms to use runInteraction so the transacion has a more helpful description
This commit is contained in:
parent
2bf0e85f3d
commit
8bbdf32849
@ -82,6 +82,7 @@ class RoomStore(SQLBaseStore):
|
|||||||
"topic" key if one is set, and a "name" key if one is set
|
"topic" key if one is set, and a "name" key if one is set
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
def f(txn):
|
||||||
topic_subquery = (
|
topic_subquery = (
|
||||||
"SELECT topics.event_id as event_id, "
|
"SELECT topics.event_id as event_id, "
|
||||||
"topics.room_id as room_id, topic "
|
"topics.room_id as room_id, topic "
|
||||||
@ -113,7 +114,13 @@ class RoomStore(SQLBaseStore):
|
|||||||
"name": name_subquery,
|
"name": name_subquery,
|
||||||
}
|
}
|
||||||
|
|
||||||
rows = yield self._execute(None, sql, is_public)
|
c = txn.execute(sql, (is_public,))
|
||||||
|
|
||||||
|
return c.fetchall()
|
||||||
|
|
||||||
|
rows = yield self.runInteraction(
|
||||||
|
"get_rooms", f
|
||||||
|
)
|
||||||
|
|
||||||
ret = [
|
ret = [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user