Revert "db"

This reverts commit 0a46ebf0a8.
This commit is contained in:
riglen
2026-04-20 14:42:33 +08:00
parent 6f71846cf0
commit 70b3568ccd
15 changed files with 3 additions and 717 deletions

View File

@@ -7,7 +7,6 @@ from typing import Any
import yaml
from app.db import init_db
from app.models import AppConfig
_ENV_PATTERN = re.compile(r"\$\{([A-Z0-9_]+)\}")
@@ -62,15 +61,5 @@ def _load_split_config(path: Path) -> dict[str, Any]:
def load_app_config(path: Path) -> AppConfig:
init_db()
from app.services.config_store import load_app_config_from_db
db_config = load_app_config_from_db()
if db_config is not None:
return db_config
return load_yaml_app_config(path)
def load_yaml_app_config(path: Path) -> AppConfig:
expanded = _expand_env(_load_split_config(path))
return AppConfig.model_validate(expanded)