fix(session): reduce default max_retries from 10 to 5 for CurlSession

fix(service): reduce max_retries from 15 to 5 for HTTPAdapter
This commit is contained in:
Andy
2026-02-23 12:59:07 -07:00
parent 8b63be4f3e
commit 983fd18d53
2 changed files with 2 additions and 2 deletions

View File

@@ -222,7 +222,7 @@ class Service(metaclass=ABCMeta):
session.mount( session.mount(
"https://", "https://",
HTTPAdapter( HTTPAdapter(
max_retries=Retry(total=15, backoff_factor=0.2, status_forcelist=[429, 500, 502, 503, 504]), max_retries=Retry(total=5, backoff_factor=0.2, status_forcelist=[429, 500, 502, 503, 504]),
pool_block=True, pool_block=True,
), ),
) )

View File

@@ -56,7 +56,7 @@ class MaxRetriesError(exceptions.RequestException):
class CurlSession(Session): class CurlSession(Session):
def __init__( def __init__(
self, self,
max_retries: int = 10, max_retries: int = 5,
backoff_factor: float = 0.2, backoff_factor: float = 0.2,
max_backoff: float = 60.0, max_backoff: float = 60.0,
status_forcelist: list[int] | None = None, status_forcelist: list[int] | None = None,