summary refs log tree commit diff
path: root/synapse/storage/data_stores/main/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-12-06 13:08:40 +0000
committerErik Johnston <erik@matrix.org>2019-12-06 13:30:06 +0000
commit9a4fb457cf5918c85068ea249cd2d58b3e2e3cfc (patch)
tree4bb85c953cb523732bcc53ec01b7c1f8209ac1ad /synapse/storage/data_stores/main/room.py
parentMerge pull request #6469 from matrix-org/erikj/make_database_class (diff)
downloadsynapse-9a4fb457cf5918c85068ea249cd2d58b3e2e3cfc.tar.xz
Change DataStores to accept 'database' param.
Diffstat (limited to 'synapse/storage/data_stores/main/room.py')
-rw-r--r--synapse/storage/data_stores/main/room.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/storage/data_stores/main/room.py b/synapse/storage/data_stores/main/room.py
index da42dae243..0148be20d3 100644
--- a/synapse/storage/data_stores/main/room.py
+++ b/synapse/storage/data_stores/main/room.py
@@ -29,6 +29,7 @@ from synapse.api.constants import EventTypes
 from synapse.api.errors import StoreError
 from synapse.storage._base import SQLBaseStore
 from synapse.storage.data_stores.main.search import SearchStore
+from synapse.storage.database import Database
 from synapse.types import ThirdPartyInstanceID
 from synapse.util.caches.descriptors import cached, cachedInlineCallbacks
 
@@ -361,8 +362,8 @@ class RoomWorkerStore(SQLBaseStore):
 
 
 class RoomBackgroundUpdateStore(SQLBaseStore):
-    def __init__(self, db_conn, hs):
-        super(RoomBackgroundUpdateStore, self).__init__(db_conn, hs)
+    def __init__(self, database: Database, db_conn, hs):
+        super(RoomBackgroundUpdateStore, self).__init__(database, db_conn, hs)
 
         self.config = hs.config
 
@@ -440,8 +441,8 @@ class RoomBackgroundUpdateStore(SQLBaseStore):
 
 
 class RoomStore(RoomBackgroundUpdateStore, RoomWorkerStore, SearchStore):
-    def __init__(self, db_conn, hs):
-        super(RoomStore, self).__init__(db_conn, hs)
+    def __init__(self, database: Database, db_conn, hs):
+        super(RoomStore, self).__init__(database, db_conn, hs)
 
         self.config = hs.config