mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-03-10 16:39:01 +00:00
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:
@@ -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,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user