diff options
| author | Ellie Huxtable <ellie@elliehuxtable.com> | 2024-01-19 15:45:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-19 15:45:42 +0000 |
| commit | 8899ce5089091e21eae088da692468565401abba (patch) | |
| tree | 2ce3812470a43371ca19a71f885991873817e1a8 /atuin-client/src/settings.rs | |
| parent | fix: Use existing db querying for history list (#1589) (diff) | |
| download | atuin-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/settings.rs')
| -rw-r--r-- | atuin-client/src/settings.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/atuin-client/src/settings.rs b/atuin-client/src/settings.rs index 36bbd826..e57b61e3 100644 --- a/atuin-client/src/settings.rs +++ b/atuin-client/src/settings.rs @@ -244,6 +244,7 @@ pub struct Settings { pub network_connect_timeout: u64, pub network_timeout: u64, + pub local_timeout: f64, pub enter_accept: bool, #[serde(default)] @@ -456,6 +457,7 @@ impl Settings { .set_default("secrets_filter", true)? .set_default("network_connect_timeout", 5)? .set_default("network_timeout", 30)? + .set_default("local_timeout", 2.0)? // enter_accept defaults to false here, but true in the default config file. The dissonance is // intentional! // Existing users will get the default "False", so we don't mess with any potential |
