mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2025-12-06 07:55:31 +00:00
CP-2126 Replace value with constant
This commit is contained in:
parent
cd1ef36f03
commit
185d1da213
@ -40,7 +40,8 @@ class ThousandEyesRetry(Retry):
|
||||
|
||||
def is_retry(self, method: str, status_code: int, has_retry_after: bool = False) -> bool:
|
||||
# Always retry on 429, regardless of method or status_forcelist
|
||||
return status_code == 429 or super().is_retry(method, status_code, has_retry_after)
|
||||
return (status_code == self.HTTP_TOO_MANY_REQUESTS or
|
||||
super().is_retry(method, status_code, has_retry_after))
|
||||
|
||||
def get_retry_after(self, response: BaseHTTPResponse) -> Optional[float]:
|
||||
retry_after: Optional[float] = super().get_retry_after(response)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user