summary refs log tree commit diff
path: root/synapse/storage/registration.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-20 15:59:18 +0000
committerErik Johnston <erik@matrix.org>2015-03-20 15:59:18 +0000
commitdc0c989ef43ecfe3b4159e0cf16c50a7f38c1f20 (patch)
tree1ca0cdc43de15f154d3049af20b276398168d311 /synapse/storage/registration.py
parentStart removing Tables (diff)
downloadsynapse-dc0c989ef43ecfe3b4159e0cf16c50a7f38c1f20.tar.xz
Give sensible names for '_simple_...' transactions
Diffstat (limited to 'synapse/storage/registration.py')
-rw-r--r--synapse/storage/registration.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index 3c2f1d6a15..f24154f146 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -39,7 +39,10 @@ class RegistrationStore(SQLBaseStore):
         Raises:
             StoreError if there was a problem adding this.
         """
-        row = yield self._simple_select_one("users", {"name": user_id}, ["id"])
+        row = yield self._simple_select_one(
+            "users", {"name": user_id}, ["id"],
+            desc="add_access_token_to_user",
+        )
         if not row:
             raise StoreError(400, "Bad user ID supplied.")
         row_id = row["id"]
@@ -48,7 +51,8 @@ class RegistrationStore(SQLBaseStore):
             {
                 "user_id": row_id,
                 "token": token
-            }
+            },
+            desc="add_access_token_to_user",
         )
 
     @defer.inlineCallbacks
@@ -120,6 +124,7 @@ class RegistrationStore(SQLBaseStore):
             keyvalues={"name": user.to_string()},
             retcol="admin",
             allow_none=True,
+            desc="is_server_admin",
         )
 
         defer.returnValue(res if res else False)