Backend: WAL+busy_timeout, DB↔Datei-Reconcile beim Start, zentraler JSON-Parser (jsonio)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
team3
2026-06-12 07:54:57 +02:00
parent 38db80296c
commit c0b7d236bb
4 changed files with 69 additions and 40 deletions

View File

@@ -60,6 +60,9 @@ async def get_db() -> aiosqlite.Connection:
async def init_db():
db = await get_db()
# WAL übersteht Crashes deutlich besser; busy_timeout fängt kurze Locks ab.
await db.execute("PRAGMA journal_mode=WAL")
await db.execute("PRAGMA busy_timeout=5000")
await db.execute(CREATE_GUIDES)
await db.execute(CREATE_PROGRESS)
await db.execute(CREATE_TOPICS)