mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 18:24:50 -04:00
Add a .runInteraction() method on SQLBaseStore itself to wrap the .db_pool
This commit is contained in:
parent
249e8f2277
commit
e53d77b501
8 changed files with 42 additions and 33 deletions
|
@ -62,7 +62,7 @@ class RegistrationStore(SQLBaseStore):
|
|||
Raises:
|
||||
StoreError if the user_id could not be registered.
|
||||
"""
|
||||
yield self._db_pool.runInteraction(self._register, user_id, token,
|
||||
yield self.runInteraction(self._register, user_id, token,
|
||||
password_hash)
|
||||
|
||||
def _register(self, txn, user_id, token, password_hash):
|
||||
|
@ -99,7 +99,7 @@ class RegistrationStore(SQLBaseStore):
|
|||
Raises:
|
||||
StoreError if no user was found.
|
||||
"""
|
||||
user_id = yield self._db_pool.runInteraction(self._query_for_auth,
|
||||
user_id = yield self.runInteraction(self._query_for_auth,
|
||||
token)
|
||||
defer.returnValue(user_id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue