Skip to content

Commit

Permalink
increase total waiting time to 8 mins
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Oct 18, 2023
1 parent 7aeb41d commit ee16504
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dsp_permissions_scripts/utils/try_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def http_call_with_retry(action: Callable[..., requests.Response], err_msg: str)
"""
Function that tries 7 times to execute an HTTP request.
502 and 404 are catched, and the request is retried after a waiting time.
The waiting times are 1, 2, 4, 8, 16, 32, 64 seconds.
The waiting times are 1, 2, 4, 8, 16, 32, 64, 128, 256 seconds.
Use this only for actions that can be retried without side effects.
Args:
Expand All @@ -27,7 +27,7 @@ def http_call_with_retry(action: Callable[..., requests.Response], err_msg: str)
Returns:
response of the HTTP request
"""
for i in range(7):
for i in range(9):
try:
response: requests.Response = action()
if response.status_code == 200:
Expand Down

0 comments on commit ee16504

Please sign in to comment.