mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-11 15:30:23 -04:00
Move start up DB checks to main data store.
This commit is contained in:
parent
d537be1ebd
commit
75f87450d8
2 changed files with 12 additions and 18 deletions
|
@ -14,6 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
from synapse.storage.database import Database
|
||||
from synapse.storage.prepare_database import prepare_database
|
||||
|
||||
|
||||
class DataStores(object):
|
||||
|
@ -26,4 +27,10 @@ class DataStores(object):
|
|||
# Note we pass in the main store here as workers use a different main
|
||||
# store.
|
||||
database = Database(hs)
|
||||
|
||||
# Check that db is correctly configured.
|
||||
database.engine.check_database(db_conn.cursor())
|
||||
|
||||
prepare_database(db_conn, database.engine, config=hs.config)
|
||||
|
||||
self.main = main_store_class(database, db_conn, hs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue