aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/src/record/sync.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2024-01-19 15:45:42 +0000
committerGitHub <noreply@github.com>2024-01-19 15:45:42 +0000
commit8899ce5089091e21eae088da692468565401abba (patch)
tree2ce3812470a43371ca19a71f885991873817e1a8 /atuin-client/src/record/sync.rs
parentfix: Use existing db querying for history list (#1589) (diff)
downloadatuin-8899ce5089091e21eae088da692468565401abba.zip
fix: add acquire timeout to sqlite database connection (#1590)
* fix: add acquire timeout to sqlite database connection This should fix #1503 I wasn't able to trigger enough IO pressure for the SQL connection to be a problem. This adds `local_timeout` to the client config. This is a float, and represents the number of seconds (units in line with the other timeouts, though those are ints). Users may well want to reduce this if they regularly have issues, but by default I think 2s is fine and avoids a non-responsive system in bad situations. * tests
Diffstat (limited to 'atuin-client/src/record/sync.rs')
-rw-r--r--atuin-client/src/record/sync.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/atuin-client/src/record/sync.rs b/atuin-client/src/record/sync.rs
index 19b8dd1b..97152f79 100644
--- a/atuin-client/src/record/sync.rs
+++ b/atuin-client/src/record/sync.rs
@@ -317,10 +317,10 @@ mod tests {
local_records: Vec<Record<EncryptedData>>,
remote_records: Vec<Record<EncryptedData>>,
) -> (SqliteStore, Vec<Diff>) {
- let local_store = SqliteStore::new(":memory:")
+ let local_store = SqliteStore::new(":memory:", 0.1)
.await
.expect("failed to open in memory sqlite");
- let remote_store = SqliteStore::new(":memory:")
+ let remote_store = SqliteStore::new(":memory:", 0.1)
.await
.expect("failed to open in memory sqlite"); // "remote"