Use WAL in sqlite3 to avoid database locks that prevent reads

This commit is contained in:
mdivecky 2023-08-17 12:25:01 +02:00
parent 9e5ff527ba
commit e9aa8a3a06

View file

@ -33,6 +33,8 @@ db_con = sqlite3.connect("../data/diffs.db")
db = db_con.cursor() db = db_con.cursor()
db.executescript(""" db.executescript("""
PRAGMA journal_mode=WAL;
CREATE TABLE IF NOT EXISTS diffs ( CREATE TABLE IF NOT EXISTS diffs (
diff_id INTEGER PRIMARY KEY, diff_id INTEGER PRIMARY KEY,
article_id TEXT, article_id TEXT,