fix(backfill): init sqlite before reading settings

Script failed with "SQLite not initialized" because module-level connection
state wasn't set up when invoked standalone.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-04-22 07:02:40 +00:00
parent 819af221d8
commit 404bc094cd

View File

@@ -84,6 +84,7 @@ async def _backfill_one(order_number: str, app_settings: dict, use_oracle: bool)
async def main(order_numbers: list[str]): async def main(order_numbers: list[str]):
database.init_sqlite()
app_settings = await sqlite_service.get_app_settings() app_settings = await sqlite_service.get_app_settings()
use_oracle = False use_oracle = False