mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 15:15:00 -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
|
@ -271,7 +271,7 @@ class DataStore(
|
|||
|
||||
def get_users_paginate_txn(txn):
|
||||
filters = []
|
||||
args = [self.hs.config.server_name]
|
||||
args = [self.hs.config.server.server_name]
|
||||
|
||||
# Set ordering
|
||||
order_by_column = UserSortOrder(order_by).value
|
||||
|
@ -356,13 +356,13 @@ def check_database_before_upgrade(cur, database_engine, config: HomeServerConfig
|
|||
return
|
||||
|
||||
user_domain = get_domain_from_id(rows[0][0])
|
||||
if user_domain == config.server_name:
|
||||
if user_domain == config.server.server_name:
|
||||
return
|
||||
|
||||
raise Exception(
|
||||
"Found users in database not native to %s!\n"
|
||||
"You cannot change a synapse server_name after it's been configured"
|
||||
% (config.server_name,)
|
||||
% (config.server.server_name,)
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue