merge settings groups instead of using whole group

This commit is contained in:
2021-03-30 04:53:15 +03:00
parent bd2b61494f
commit 2260e52d5c
14 changed files with 222 additions and 101 deletions

View File

@ -58,9 +58,10 @@ def run_server(application: web.Application) -> None:
"""
application.logger.info("start server")
section = application["config"].get_section_name("web", application["architecture"])
host = application["config"].get(section, "host")
port = application["config"].getint(section, "port")
architecture: str = application["architecture"]
config: Configuration = application["config"]
host = config.wrap("web", architecture, "host", config.get)
port = config.wrap("web", architecture, "port", config.getint)
web.run_app(application, host=host, port=port, handle_signals=False,
access_log=logging.getLogger("http"))