mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-22 17:36:15 +00:00
Connect to SQLite using WAL mode
Significantely speeds up all database requests and should solve the dreaded "database is currently locked" issue that shows up from time to time
This commit is contained in:
@@ -40,6 +40,7 @@ class CustomSqliteConnection(sqlite3.Connection):
|
||||
def __init__(self, *args, **kwargs): # real signature unknown
|
||||
super().__init__(*args, **kwargs)
|
||||
self.callbacks = []
|
||||
self.execute("PRAGMA journal_mode=WAL;")
|
||||
|
||||
def execute_callbacks(self):
|
||||
for callback in self.callbacks:
|
||||
|
||||
Reference in New Issue
Block a user