Separate bootstrap settings from runtime overrides with a dedicated runtime settings manager
This commit is contained in:
@@ -16,6 +16,7 @@ from typing import TYPE_CHECKING, Any
|
||||
import structlog
|
||||
|
||||
from app.db import open_db
|
||||
from app.utils.runtime_state import get_effective_settings
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import aiosqlite
|
||||
@@ -34,7 +35,8 @@ JOB_ID: str = "geo_cache_flush"
|
||||
|
||||
|
||||
async def _get_db(app: Any) -> 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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user