fix: SQLite check_same_thread=False for async usage

This commit is contained in:
2026-06-17 12:45:32 +07:00
parent 957eedb5ed
commit 5eec400f20

View File

@@ -28,7 +28,7 @@ API_BASE = "https://i.instagram.com/api/v1"
class Database:
def __init__(self, db_path: Path) -> None:
self._db_path = db_path
self._conn = sqlite3.connect(str(db_path))
self._conn = sqlite3.connect(str(db_path), check_same_thread=False)
self._conn.execute("PRAGMA journal_mode=WAL")
self._init_db()