mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 09:56:05 -04:00
Use direct references for some configuration variables (#10798)
Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit).
This commit is contained in:
parent
9f111075e8
commit
01c88a09cd
66 changed files with 152 additions and 133 deletions
|
@ -134,7 +134,7 @@ def prepare_database(
|
|||
# if it's a worker app, refuse to upgrade the database, to avoid multiple
|
||||
# workers doing it at once.
|
||||
if (
|
||||
config.worker_app is not None
|
||||
config.worker.worker_app is not None
|
||||
and version_info.current_version != SCHEMA_VERSION
|
||||
):
|
||||
raise UpgradeDatabaseException(
|
||||
|
@ -154,7 +154,7 @@ def prepare_database(
|
|||
|
||||
# if it's a worker app, refuse to upgrade the database, to avoid multiple
|
||||
# workers doing it at once.
|
||||
if config and config.worker_app is not None:
|
||||
if config and config.worker.worker_app is not None:
|
||||
raise UpgradeDatabaseException(EMPTY_DATABASE_ON_WORKER_ERROR)
|
||||
|
||||
_setup_new_database(cur, database_engine, databases=databases)
|
||||
|
@ -355,7 +355,7 @@ def _upgrade_existing_database(
|
|||
else:
|
||||
assert config
|
||||
|
||||
is_worker = config and config.worker_app is not None
|
||||
is_worker = config and config.worker.worker_app is not None
|
||||
|
||||
if (
|
||||
current_schema_state.compat_version is not None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue