forked from matteo/serves3
chore: cleanup error handling
This commit is contained in:
parent
3c07716a83
commit
caacb91123
2 changed files with 28 additions and 21 deletions
|
@ -2,9 +2,10 @@
|
|||
// SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
use {
|
||||
object_store::{ObjectStore, aws},
|
||||
object_store::{BackoffConfig, ObjectStore, RetryConfig, aws},
|
||||
rocket::serde::Deserialize,
|
||||
serde::de::Error,
|
||||
std::time::Duration,
|
||||
};
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
@ -48,6 +49,11 @@ impl TryInto<Box<dyn ObjectStore>> for S3Config {
|
|||
.with_secret_access_key(self.secret_access_key)
|
||||
.with_virtual_hosted_style_request(!self.path_style)
|
||||
.with_allow_http(true)
|
||||
.with_retry(RetryConfig {
|
||||
max_retries: 1,
|
||||
backoff: BackoffConfig::default(),
|
||||
retry_timeout: Duration::from_millis(500),
|
||||
})
|
||||
.build()?;
|
||||
|
||||
log::info!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue