Skip to content

Commit 9513b19

Browse files
authored
Merge pull request #8 from CMCC-Foundation/boto3_config_with_retries
Boto3 config with retries
2 parents 0d43bff + 7f2fe92 commit 9513b19

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

environment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ channels:
44
- defaults
55
dependencies:
66
- python >= 3.9
7-
- copernicusmarine >2.1
7+
- copernicusmarine >= 2.2.2
8+
- zarr >= 3.0
89
- boto3 >=1.37.4
910
- click >=8.1.8

mds/core/s3_singleton.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ def __new__(cls, *args, **kwargs):
6767
def __init__(self, s3_endpoint=S3_ENDPOINT):
6868
s3_endpoint = s3_endpoint
6969
self.__s3 = boto3.client(
70-
"s3", endpoint_url=s3_endpoint, config=Config(signature_version=UNSIGNED)
70+
"s3",
71+
endpoint_url=s3_endpoint,
72+
config=Config(
73+
signature_version=UNSIGNED,
74+
retries={"max_attempts": 10, "mode": "adaptive"},
75+
),
7176
)
7277
self.__paginator = self.__s3.get_paginator("list_objects_v2")
7378

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "mds-toolbox"
3-
version = "2.0.1"
3+
version = "2.0.2"
44
description = "A custom CMCC library to list and download data from the Marine Data Store"
55
authors = ["Antonio Mariani <[email protected]>"]
66
readme = ["README.md"]
@@ -13,8 +13,9 @@ keywords = ["copernicus", "copernicusmarine", "mds", "marine data store"]
1313
[tool.poetry.dependencies]
1414
python = ">=3.9,<3.13"
1515
boto3 = "^1.37.4"
16-
copernicusmarine = ">=2.1.1"
16+
copernicusmarine = ">=2.2.2"
1717
click = "^8.1.8"
18+
zarr = ">= 3.0"
1819

1920
[build-system]
2021
requires = ["poetry-core"]

0 commit comments

Comments
 (0)