diff --git a/VERSION b/VERSION index 429d94a..b0a1227 100755 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.9 \ No newline at end of file +0.0.10 \ No newline at end of file diff --git a/tests/.wickerconfig.test.json b/tests/.wickerconfig.test.json index c78185a..939c79e 100644 --- a/tests/.wickerconfig.test.json +++ b/tests/.wickerconfig.test.json @@ -5,7 +5,8 @@ "boto_config": { "max_pool_connections":10, "read_timeout_s": 140, - "connect_timeout_s": 140 + "connect_timeout_s": 140, + "tcp_keepalive": true } }, "dynamodb_config": { diff --git a/tests/test_s3_storage.py b/tests/test_s3_storage.py index 2095e75..18ab046 100644 --- a/tests/test_s3_storage.py +++ b/tests/test_s3_storage.py @@ -147,7 +147,12 @@ def test_get_column_concatenated_bytes_files_path(self, mock_get_config: mock.Mo "aws_s3_config": { "s3_datasets_path": "s3://dummy_bucket/wicker/", "region": "us-east-1", - "boto_config": {"max_pool_connections": 10, "read_timeout_s": 140, "connect_timeout_s": 140}, + "boto_config": { + "max_pool_connections": 10, + "read_timeout_s": 140, + "connect_timeout_s": 140, + "tcp_keepalive": True, + }, }, "dynamodb_config": {"table_name": "fake-table-name", "region": "us-west-2"}, "storage_download_config": { diff --git a/wicker/core/config.py b/wicker/core/config.py index 49d4c1d..b8a9fc7 100644 --- a/wicker/core/config.py +++ b/wicker/core/config.py @@ -28,6 +28,7 @@ class BotoS3Config: max_pool_connections: int read_timeout_s: int connect_timeout_s: int + tcp_keepalive: bool @classmethod def from_json(cls, data: Dict[str, Any]) -> BotoS3Config: @@ -35,6 +36,7 @@ def from_json(cls, data: Dict[str, Any]) -> BotoS3Config: max_pool_connections=data["max_pool_connections"], read_timeout_s=data["read_timeout_s"], connect_timeout_s=data["connect_timeout_s"], + tcp_keepalive=data["tcp_keepalive"], ) diff --git a/wicker/core/storage.py b/wicker/core/storage.py index 24fb8c5..24e00a8 100644 --- a/wicker/core/storage.py +++ b/wicker/core/storage.py @@ -42,6 +42,7 @@ def __init__(self, session: Optional[boto3.session.Session] = None) -> None: max_pool_connections=boto_config.max_pool_connections, read_timeout=boto_config.read_timeout_s, connect_timeout=boto_config.connect_timeout_s, + tcp_keepalive=boto_config.tcp_keepalive, ) self.session = boto3.session.Session() if session is None else session self.client = self.session.client("s3", config=boto_client_config)