Add an option to not enable WAL (should help in #399)

This commit is contained in:
Miroslav Prasil
2019-02-18 10:48:48 +00:00
parent d7eeaaf249
commit 4df686f49e
2 changed files with 10 additions and 5 deletions

View File

@ -168,11 +168,13 @@ fn check_db() {
}
// Turn on WAL in SQLite
use diesel::RunQueryDsl;
let connection = db::get_connection().expect("Can't conect to DB");
diesel::sql_query("PRAGMA journal_mode=wal")
.execute(&connection)
.expect("Failed to turn on WAL");
if CONFIG.enable_db_wal() {
use diesel::RunQueryDsl;
let connection = db::get_connection().expect("Can't conect to DB");
diesel::sql_query("PRAGMA journal_mode=wal")
.execute(&connection)
.expect("Failed to turn on WAL");
}
}
fn check_rsa_keys() {