Skip to content

Commit

Permalink
fix: improve
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Dec 6, 2024
1 parent 66ec76e commit b48c000
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ape_infura/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"scroll": ("mainnet",),
}

_MAX_REQUEST_RETRIES = 5 # Number of retries before giving up
_MAX_REQUEST_RETRIES = 15 # Number of retries before giving up
_REQUEST_RETRY_DELAY = 5 # Delay in seconds between retries


Expand Down Expand Up @@ -246,6 +246,7 @@ def _run_with_retry(
logger.debug(f"429 Too Many Requests. Retrying in {retry_delay} seconds...")
time.sleep(retry_delay)
retries += 1
retry_delay += retry_delay
else:
raise # Re-raise non-429 HTTP errors

Expand Down

0 comments on commit b48c000

Please sign in to comment.