mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-12 05:07:40 +02:00
Add an option to not enable WAL (should help in #399)
This commit is contained in:
12
src/main.rs
12
src/main.rs
@ -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() {
|
||||
|
Reference in New Issue
Block a user