mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 16:44:48 -04:00
Add function to load config without generating it
Renames ``load_config`` to ``load_or_generate_config`` Adds a method called ``load_config`` that just loads the config. The main synapse.app.homeserver will continue to use ``load_or_generate_config`` to retain backwards compat. However new worker processes can use ``load_config`` to load the config avoiding some of the cruft needed to generate the config. As the new ``load_config`` method is expected to be used by new configs it removes support for the legacy commandline overrides that ``load_or_generate_config`` supports
This commit is contained in:
parent
5ee5b655b2
commit
7dbb473339
4 changed files with 125 additions and 47 deletions
|
@ -30,7 +30,7 @@ class ConfigGenerationTestCase(unittest.TestCase):
|
|||
shutil.rmtree(self.dir)
|
||||
|
||||
def test_generate_config_generates_files(self):
|
||||
HomeServerConfig.load_config("", [
|
||||
HomeServerConfig.load_or_generate_config("", [
|
||||
"--generate-config",
|
||||
"-c", self.file,
|
||||
"--report-stats=yes",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue