fix: address code review findings

- Add retry (2 attempts) on CivitAI 429 rate limit instead of silently skipping
- Use check_same_thread=False for SQLite connection (aiohttp context)
- Add debug logging to silent exception handlers in proxy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-15 14:44:12 +01:00
parent 63ddaaa70d
commit f6e39df157
3 changed files with 24 additions and 21 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ class StatsDB:
def init(self) -> None:
"""Create the database and table if they don't exist."""
self._conn = sqlite3.connect(str(self._db_path))
self._conn = sqlite3.connect(str(self._db_path), check_same_thread=False)
self._conn.row_factory = sqlite3.Row
self._conn.execute("PRAGMA journal_mode=WAL")
self._conn.executescript(_SCHEMA)