From f68788f84057ca3f9792ef498a4df613b0dc6d84 Mon Sep 17 00:00:00 2001 From: justinpolygon <123573436+justinpolygon@users.noreply.github.com> Date: Wed, 22 Nov 2023 08:36:14 -0800 Subject: [PATCH 1/2] Update base.py --- polygon/rest/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polygon/rest/base.py b/polygon/rest/base.py index 0f82191c..d6b73684 100644 --- a/polygon/rest/base.py +++ b/polygon/rest/base.py @@ -54,7 +54,7 @@ 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, ...] ) From 9bb9d0c7958a5e9d7ab80299f666275596835c8d Mon Sep 17 00:00:00 2001 From: justinpolygon <123573436+justinpolygon@users.noreply.github.com> Date: Wed, 22 Nov 2023 08:42:33 -0800 Subject: [PATCH 2/2] Fix lint --- polygon/rest/base.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/polygon/rest/base.py b/polygon/rest/base.py index d6b73684..dcddb8a8 100644 --- a/polygon/rest/base.py +++ b/polygon/rest/base.py @@ -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, 499, 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, ...] )