Separate bootstrap settings from runtime overrides with a dedicated runtime settings manager

This commit is contained in:
2026-04-10 19:31:51 +02:00
parent 9b4cd17e3b
commit 3b6e39ddad
11 changed files with 61 additions and 32 deletions

View File

@@ -22,6 +22,7 @@ from typing import TYPE_CHECKING
import structlog
from app.db import open_db
from app.utils.runtime_state import get_effective_settings
if TYPE_CHECKING:
import aiosqlite
@@ -40,7 +41,8 @@ JOB_ID: str = "geo_re_resolve"
async def _get_db(app: FastAPI) -> tuple[aiosqlite.Connection, bool]:
db = await open_db(app.state.settings.database_path)
settings = get_effective_settings(app)
db = await open_db(settings.database_path)
return db, True