Change web framework to Starlette, db versioning to alembic #93

Closed
Hay1tsme wants to merge 32 commits from starlette_cleanup into master
3 changed files with 10 additions and 1 deletions
Showing only changes of commit bb752563cc - Show all commits

View File

@ -314,6 +314,12 @@ class AimedbConfig:
def __init__(self, parent_config: "CoreConfig") -> None:
self.__config = parent_config
@property
def enable(self) -> bool:
return CoreConfig.get_config_field(
self.__config, "core", "aimedb", "enable", default=True
)
@property
def loglevel(self) -> int:
return CoreConfig.str_to_loglevel(

View File

@ -54,6 +54,7 @@ billing:
signing_key: "cert/billing.key"
aimedb:
enable: True
loglevel: "info"
port: 22345
key: ""

View File

@ -69,14 +69,16 @@ async def launch_allnet(cfg: CoreConfig) -> None:
async def launcher(cfg: CoreConfig, ssl: bool) -> None:
AimedbServlette(cfg).start()
task_list = [asyncio.create_task(launch_main(cfg, ssl))]
if cfg.billing.standalone:
task_list.append(asyncio.create_task(launch_billing(cfg)))
if cfg.frontend.enable:
task_list.append(asyncio.create_task(launch_frontend(cfg)))
if cfg.allnet.standalone:
task_list.append(asyncio.create_task(launch_allnet(cfg)))
if cfg.aimedb.enable:
AimedbServlette(cfg).start()
done, pending = await asyncio.wait(
task_list,