Skip to content

Commit

Permalink
feat: add PRAGMA synchronous=NORMAL to database connection setup
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyeager committed Jan 3, 2025
1 parent f485bdc commit ac89fba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def __init__(
for _ in range(self.connection_pool_size):
conn = sqlite3.connect(self.db_path, check_same_thread=False)
conn.execute("PRAGMA journal_mode=WAL")
conn.execute("PRAGMA synchronous=NORMAL")
conn.execute("PRAGMA busy_timeout=5000") # 5 second timeout
self.pool.put(conn)

Expand Down

0 comments on commit ac89fba

Please sign in to comment.