Skip to content

Commit a29aa23

Browse files
Enable retries in the SDK
1 parent 0ada18d commit a29aa23

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ indexmap = "1.4.0"
6565
tokio = "1.18"
6666
aws-types = { version = "0.46", features = ["hardcoded-credentials"] }
6767
aws-smithy-http = "0.46"
68+
aws-smithy-async = "0.46"
6869
aws-sdk-s3 = "0.16"
6970

7071
[dev-dependencies]

src/server/reports.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ fn generate_report(data: &Data, ex: &Experiment, results: &DatabaseDB) -> Fallib
2828
}
2929
}
3030
config.set_credentials_provider(Some(data.tokens.reports_bucket.to_aws_credentials()));
31+
// https://github.com/awslabs/aws-sdk-rust/issues/586 -- without this, the
32+
// SDK will just completely not retry requests.
33+
config.set_sleep_impl(Some(Arc::new(
34+
aws_smithy_async::rt::sleep::TokioSleep::new(),
35+
)));
3136
let config = config.build();
3237
let client = aws_sdk_s3::Client::new(&config);
3338
let writer = report::S3Writer::create(

0 commit comments

Comments
 (0)