Skip to content

Commit

Permalink
bug-1827506: Rename storage timeout settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
smarnach committed Jul 29, 2024
1 parent 69aac3c commit b08c54c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tecken/ext/gcs/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(
# The Cloud Storage client doesn't support setting global timeouts for all requests, so we
# need to pass the timeout for every single request. the default timeout is 60 seconds for
# both connecting and reading from the socket.
self.timeout = (settings.S3_CONNECT_TIMEOUT, settings.S3_READ_TIMEOUT)
self.timeout = (settings.STORAGE_CONNECT_TIMEOUT, settings.STORAGE_READ_TIMEOUT)

def __repr__(self):
return f"<{self.__class__.__name__} gs://{self.bucket}/{self.prefix}> try:{self.try_symbols}"
Expand Down
4 changes: 2 additions & 2 deletions tecken/ext/s3/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def _get_client(self):
if not hasattr(self.clients, "storage"):
options = {
"config": Config(
read_timeout=settings.S3_READ_TIMEOUT,
connect_timeout=settings.S3_CONNECT_TIMEOUT,
read_timeout=settings.STORAGE_READ_TIMEOUT,
connect_timeout=settings.STORAGE_CONNECT_TIMEOUT,
)
}
if self.endpoint_url:
Expand Down
4 changes: 2 additions & 2 deletions tecken/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,13 @@ def filter(self, record):
},
}

S3_CONNECT_TIMEOUT = _config(
STORAGE_CONNECT_TIMEOUT = _config(
"S3_LOOKUP_CONNECT_TIMEOUT",
default="5",
parser=int,
doc="S3 connection timeout in seconds.",
)
S3_READ_TIMEOUT = _config(
STORAGE_READ_TIMEOUT = _config(
"S3_LOOKUP_READ_TIMEOUT",
default="5",
parser=int,
Expand Down

0 comments on commit b08c54c

Please sign in to comment.