diff options
author | Erik Johnston <erik@matrix.org> | 2019-12-06 13:40:02 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-12-06 15:49:44 +0000 |
commit | d537be1ebd0e7ce4c84118efa400932cc6432aa9 (patch) | |
tree | 826900b4179f93fa40e4ea3b09b3adf35295e4dc /synapse/storage/data_stores | |
parent | Move are_all_users_on_domain checks to main data store. (diff) | |
download | synapse-d537be1ebd0e7ce4c84118efa400932cc6432aa9.tar.xz |
Pass Database into the data store
Diffstat (limited to 'synapse/storage/data_stores')
-rw-r--r-- | synapse/storage/data_stores/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/storage/data_stores/__init__.py b/synapse/storage/data_stores/__init__.py index cb184a98cc..79ecc62735 100644 --- a/synapse/storage/data_stores/__init__.py +++ b/synapse/storage/data_stores/__init__.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from synapse.storage.database import Database + class DataStores(object): """The various data stores. @@ -20,7 +22,8 @@ class DataStores(object): These are low level interfaces to physical databases. """ - def __init__(self, main_store, db_conn, hs): + def __init__(self, main_store_class, db_conn, hs): # Note we pass in the main store here as workers use a different main # store. - self.main = main_store + database = Database(hs) + self.main = main_store_class(database, db_conn, hs) |