Skip to content

Commit

Permalink
Release version 3.8.4, Merge pull request #410 from sentinel-hub/develop
Browse files Browse the repository at this point in the history
Release version 3.8.4
  • Loading branch information
zigaLuksic authored Feb 24, 2023
2 parents c320ff6 + a47ef0b commit 506162a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sentinelhub/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version of the sentinelhub package."""

__version__ = "3.8.3"
__version__ = "3.8.4"
2 changes: 1 addition & 1 deletion sentinelhub/download/rate_limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def register_next(self) -> float:

def update(self, headers: dict) -> None:
"""Update the next possible download time if the service has responded with the rate limit"""
retry_after: float = round(headers.get(self.RETRY_HEADER, 0))
retry_after: float = int(headers.get(self.RETRY_HEADER, 0)) # can be a string representation of a number
retry_after = retry_after / 1000

if retry_after:
Expand Down
2 changes: 1 addition & 1 deletion tests/download/test_rate_limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _get_headers(self, is_rate_limited: bool) -> JsonDict:
)
expected_wait_time = max(expected_request_wait_time, expected_units_wait_time)

headers[SentinelHubRateLimit.RETRY_HEADER] = int(1000 * expected_wait_time)
headers[SentinelHubRateLimit.RETRY_HEADER] = str(int(1000 * expected_wait_time))

return headers

Expand Down

0 comments on commit 506162a

Please sign in to comment.