diff options
author | Erik Johnston <erik@matrix.org> | 2019-12-09 13:53:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 13:53:21 +0000 |
commit | 30e9adf32f7db9aa44693876d33692bf4590d363 (patch) | |
tree | 9b83e1dc2eeefaafe8eca4e5b95cffdf8572b346 /synapse/app/user_dir.py | |
parent | Merge pull request #6493 from matrix-org/erikj/invite_state_config (diff) | |
parent | Fix comment (diff) | |
download | synapse-30e9adf32f7db9aa44693876d33692bf4590d363.tar.xz |
Merge pull request #6487 from matrix-org/erikj/pass_in_db
Pass in Database object to data stores.
Diffstat (limited to 'synapse/app/user_dir.py')
-rw-r--r-- | synapse/app/user_dir.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/app/user_dir.py b/synapse/app/user_dir.py index b6d4481725..c01fb34a9b 100644 --- a/synapse/app/user_dir.py +++ b/synapse/app/user_dir.py @@ -43,6 +43,7 @@ from synapse.replication.tcp.streams.events import ( from synapse.rest.client.v2_alpha import user_directory from synapse.server import HomeServer from synapse.storage.data_stores.main.user_directory import UserDirectoryStore +from synapse.storage.database import Database from synapse.storage.engines import create_engine from synapse.util.caches.stream_change_cache import StreamChangeCache from synapse.util.httpresourcetree import create_resource_tree @@ -60,8 +61,8 @@ class UserDirectorySlaveStore( UserDirectoryStore, BaseSlavedStore, ): - def __init__(self, db_conn, hs): - super(UserDirectorySlaveStore, self).__init__(db_conn, hs) + def __init__(self, database: Database, db_conn, hs): + super(UserDirectorySlaveStore, self).__init__(database, db_conn, hs) events_max = self._stream_id_gen.get_current_token() curr_state_delta_prefill, min_curr_state_delta_id = self.db.get_cache_dict( |