bump up s3 warc retries to 6 to avoid 503 errors
This commit is contained in:
parent
081866f62e
commit
ec33b2e857
1 changed files with 7 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/retry"
|
||||
"github.com/aws/aws-sdk-go-v2/config"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
"github.com/nlnwa/gowarc/v3"
|
||||
|
|
@ -20,7 +21,12 @@ const ccBucket = "commoncrawl"
|
|||
var s3Client *s3.Client
|
||||
|
||||
func initS3() error {
|
||||
cfg, err := config.LoadDefaultConfig(context.Background(), config.WithRegion("us-east-1"))
|
||||
cfg, err := config.LoadDefaultConfig(context.Background(),
|
||||
config.WithRegion("us-east-1"),
|
||||
config.WithRetryer(func() aws.Retryer {
|
||||
return retry.AddWithMaxAttempts(retry.NewStandard(), 6)
|
||||
}),
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("load AWS config: %w", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue