Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ log = { workspace = true }
# other dependencies
bytes = { workspace = true }
derive_setters = "0.1.8"
humantime = "2.3.0"
itertools = "0.14.0"
jiff = "0.2.16"
strum = "0.27"
strum_macros = "0.27"

Expand Down
10 changes: 7 additions & 3 deletions crates/backend/src/rest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::time::Duration;

use backon::{BlockingRetryable, ExponentialBuilder};
use bytes::Bytes;
use jiff::SignedDuration;
use log::{trace, warn};
use reqwest::{
Url,
Expand Down Expand Up @@ -186,15 +187,18 @@ impl RestBackend {
};
backoff = backoff.with_max_times(max_retries);
} else if option == "timeout" {
timeout = *humantime::Duration::from_str(&value).map_err(|err| {
timeout = SignedDuration::from_str(&value).map_err(|err| {
RusticError::with_source(
ErrorKind::InvalidInput,
"Could not parse value `{value}` as `humantime` duration. Invalid value for option `{option}`.",
"Could not parse value `{value}` as duration. Invalid value for option `{option}`.",
err,
)
.attach_context("value", value)
.attach_context("option", "timeout")
})?;
})?.try_into()
// ignore conversation errors, but print out warning
.inspect_err(|err| warn!("cannot use timeout: {err}"))
.unwrap_or_default();
} else if option == "cacert" {
client_builder = client_builder.add_root_certificate(get_cacert(&value)?);
} else if option == "tls-client-cert" {
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/repository/warm_up.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub(crate) fn warm_up_wait<P: ProgressBars, S>(
wait.try_into()
// ignore conversation errors, but print out warning
.inspect_err(|err| warn!("cannot wait for warm-up: {err}"))
.unwrap(),
.unwrap_or_default(),
);
p.finish();
}
Expand Down
Loading