fix: sqlite on pypy (#5906)

This commit is contained in:
wozeparrot
2024-08-04 23:40:59 +00:00
committed by GitHub
parent be8958e26b
commit 94917521ee

View File

@@ -208,7 +208,7 @@ def db_connection():
if _db_connection is None:
os.makedirs(CACHEDB.rsplit(os.sep, 1)[0], exist_ok=True)
_db_connection = sqlite3.connect(CACHEDB, timeout=60, isolation_level="IMMEDIATE")
_db_connection.execute("PRAGMA journal_mode=WAL")
_db_connection.execute("PRAGMA journal_mode=WAL").fetchone()
if DEBUG >= 7: _db_connection.set_trace_callback(print)
return _db_connection