chore: update

This commit is contained in:
Junyan Qin
2025-11-07 23:02:50 +08:00
parent f79cde5b0c
commit 894db240ae
2 changed files with 49 additions and 52 deletions

View File

@@ -95,43 +95,43 @@ class LoadConfigStage(stage.BootingStage):
async def run(self, ap: app.Application):
"""Load config file"""
# ======= deprecated =======
if os.path.exists('data/config/command.json'):
ap.command_cfg = await config.load_json_config(
'data/config/command.json',
'templates/legacy/command.json',
completion=False,
)
# # ======= deprecated =======
# if os.path.exists('data/config/command.json'):
# ap.command_cfg = await config.load_json_config(
# 'data/config/command.json',
# 'templates/legacy/command.json',
# completion=False,
# )
if os.path.exists('data/config/pipeline.json'):
ap.pipeline_cfg = await config.load_json_config(
'data/config/pipeline.json',
'templates/legacy/pipeline.json',
completion=False,
)
# if os.path.exists('data/config/pipeline.json'):
# ap.pipeline_cfg = await config.load_json_config(
# 'data/config/pipeline.json',
# 'templates/legacy/pipeline.json',
# completion=False,
# )
if os.path.exists('data/config/platform.json'):
ap.platform_cfg = await config.load_json_config(
'data/config/platform.json',
'templates/legacy/platform.json',
completion=False,
)
# if os.path.exists('data/config/platform.json'):
# ap.platform_cfg = await config.load_json_config(
# 'data/config/platform.json',
# 'templates/legacy/platform.json',
# completion=False,
# )
if os.path.exists('data/config/provider.json'):
ap.provider_cfg = await config.load_json_config(
'data/config/provider.json',
'templates/legacy/provider.json',
completion=False,
)
# if os.path.exists('data/config/provider.json'):
# ap.provider_cfg = await config.load_json_config(
# 'data/config/provider.json',
# 'templates/legacy/provider.json',
# completion=False,
# )
if os.path.exists('data/config/system.json'):
ap.system_cfg = await config.load_json_config(
'data/config/system.json',
'templates/legacy/system.json',
completion=False,
)
# if os.path.exists('data/config/system.json'):
# ap.system_cfg = await config.load_json_config(
# 'data/config/system.json',
# 'templates/legacy/system.json',
# completion=False,
# )
# ======= deprecated =======
# # ======= deprecated =======
ap.instance_config = await config.load_yaml_config('data/config.yaml', 'config.yaml', completion=False)