Skip to content

Commit

Permalink
Rename RetryHandler#prepare_for_next_retry() to prepare_for_next_atte…
Browse files Browse the repository at this point in the history
…mpt()
  • Loading branch information
seratch committed Aug 5, 2021
1 parent d5cc20e commit 84b12e1
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions slack_sdk/audit_logs/v1/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ async def _perform_http_request(
f"A retry handler found: {type(handler).__name__} "
f"for {http_verb} {url} - rate_limited"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down Expand Up @@ -339,7 +339,7 @@ async def _perform_http_request(
f"A retry handler found: {type(handler).__name__} "
f"for {http_verb} {url} - {e}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down
4 changes: 2 additions & 2 deletions slack_sdk/audit_logs/v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _perform_http_request(
self.logger.info(
f"A retry handler found: {type(handler).__name__} for {req.method} {req.full_url} - {e}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down Expand Up @@ -316,7 +316,7 @@ def _perform_http_request(
self.logger.info(
f"A retry handler found: {type(handler).__name__} for {req.method} {req.full_url} - {err}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=None,
Expand Down
2 changes: 1 addition & 1 deletion slack_sdk/http_retry/builtin_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _can_retry(
if response.status_code == 429:
return True

def prepare_for_next_retry(
def prepare_for_next_attempt(
self,
*,
state: RetryState,
Expand Down
2 changes: 1 addition & 1 deletion slack_sdk/http_retry/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def _can_retry(
) -> bool:
raise NotImplementedError()

def prepare_for_next_retry(
def prepare_for_next_attempt(
self,
*,
state: RetryState,
Expand Down
4 changes: 2 additions & 2 deletions slack_sdk/scim/v1/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ async def _perform_http_request(
f"A retry handler found: {type(handler).__name__} "
f"for {http_verb} {url} - rate_limited"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down Expand Up @@ -406,7 +406,7 @@ async def _perform_http_request(
f"A retry handler found: {type(handler).__name__} "
f"for {http_verb} {url} - {e}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down
4 changes: 2 additions & 2 deletions slack_sdk/scim/v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def _perform_http_request(
self.logger.info(
f"A retry handler found: {type(handler).__name__} for {req.method} {req.full_url} - {e}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down Expand Up @@ -389,7 +389,7 @@ def _perform_http_request(
self.logger.info(
f"A retry handler found: {type(handler).__name__} for {req.method} {req.full_url} - {err}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=None,
Expand Down
4 changes: 2 additions & 2 deletions slack_sdk/web/async_internal_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def convert_params(values: dict) -> dict:
f"A retry handler found: {type(handler).__name__} "
f"for {http_verb} {api_url} - rate_limited"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down Expand Up @@ -184,7 +184,7 @@ def convert_params(values: dict) -> dict:
f"A retry handler found: {type(handler).__name__} "
f"for {http_verb} {api_url} - {e}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down
4 changes: 2 additions & 2 deletions slack_sdk/web/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def _perform_urllib_http_request(
self._logger.info(
f"A retry handler found: {type(handler).__name__} for {req.method} {req.full_url} - {e}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down Expand Up @@ -469,7 +469,7 @@ def _perform_urllib_http_request(
self._logger.info(
f"A retry handler found: {type(handler).__name__} for {req.method} {req.full_url} - {err}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=None,
Expand Down
4 changes: 2 additions & 2 deletions slack_sdk/webhook/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ async def _perform_http_request(
f"A retry handler found: {type(handler).__name__} "
f"for POST {self.url} - rate_limited"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down Expand Up @@ -257,7 +257,7 @@ async def _perform_http_request(
f"A retry handler found: {type(handler).__name__} "
f"for POST {self.url} - {e}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down
4 changes: 2 additions & 2 deletions slack_sdk/webhook/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def _perform_http_request(
self.logger.info(
f"A retry handler found: {type(handler).__name__} for {req.method} {req.full_url} - {e}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=retry_response,
Expand Down Expand Up @@ -237,7 +237,7 @@ def _perform_http_request(
self.logger.info(
f"A retry handler found: {type(handler).__name__} for {req.method} {req.full_url} - {err}"
)
handler.prepare_for_next_retry(
handler.prepare_for_next_attempt(
state=retry_state,
request=retry_request,
response=None,
Expand Down

0 comments on commit 84b12e1

Please sign in to comment.