aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorShane A. Faulkner <[email protected]>2018-07-31 11:39:45 -0500
committerGitHub <[email protected]>2018-07-31 11:39:45 -0500
commit01875c395bd4050141bae0737d3a0417e48fca70 (patch)
tree52b9b581c57e6024edbfe0e0cc698549473c3025 /src/main.rs
parent98bae4a0a195eaf611f43669e3cdcfd3ac76a374 (diff)
parent2872f40d13682e9905771da900e13bc8045d509f (diff)
downloadvaultwarden-01875c395bd4050141bae0737d3a0417e48fca70.tar.gz
vaultwarden-01875c395bd4050141bae0737d3a0417e48fca70.zip
Merge pull request #1 from mprasil/concurrency_fix
WAL journal mode and delete retry added
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 17b63794..59840b9c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -83,6 +83,11 @@ fn check_db() {
exit(1);
}
}
+
+ // 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");
}
fn check_rsa_keys() {