fix: SQLite check_same_thread=False for async usage
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user