Skip to content

Commit

Permalink
Retry on 499 status code (#563)
Browse files Browse the repository at this point in the history
* Update base.py

* Fix lint
  • Loading branch information
justinpolygon authored Nov 22, 2023
1 parent 935dddb commit 7356ab5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion polygon/rest/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ def __init__(
# https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html#urllib3.util.Retry.RETRY_AFTER_STATUS_CODES
retry_strategy = Retry(
total=self.retries,
status_forcelist=[413, 429, 500, 502, 503, 504], # default 413, 429, 503
status_forcelist=[
413,
429,
499,
500,
502,
503,
504,
], # default 413, 429, 503
backoff_factor=0.1, # [0.0s, 0.2s, 0.4s, 0.8s, 1.6s, ...]
)

Expand Down

0 comments on commit 7356ab5

Please sign in to comment.