Merge remote-tracking branch 'origin/pr/3509'

This commit is contained in:
Florian Bruhin 2018-01-24 21:28:58 +01:00
commit 582236e42b

View File

@ -115,6 +115,11 @@ def init(db_path):
raise SqliteError("Failed to open sqlite database at {}: {}"
.format(db_path, error.text()), error)
# Enable write-ahead-logging and reduce disk write frequency
# see https://sqlite.org/pragma.html and issues #2930 and #3507
Query("PRAGMA journal_mode=WAL").run()
Query("PRAGMA synchronous=NORMAL").run()
def close():
"""Close the SQL connection."""