forked from kenzuya/unshackle
fix(session): cap Retry-After on the requests retry policies
A server-sent Retry-After could park a run for up to six hours.
This commit is contained in:
@@ -38,6 +38,7 @@ from unshackle.core.console import console, prompt_user
|
||||
from unshackle.core.constants import AnyTrack
|
||||
from unshackle.core.credential import Credential
|
||||
from unshackle.core.proxies.resolve import is_loopback
|
||||
from unshackle.core.session import MAX_BACKOFF
|
||||
from unshackle.core.titles import Title_T, Titles_T, remap_titles
|
||||
from unshackle.core.titles.episode import Episode, Series
|
||||
from unshackle.core.titles.movie import Movie, Movies
|
||||
@@ -921,7 +922,12 @@ class RemoteService:
|
||||
self._session.mount(
|
||||
"https://",
|
||||
HTTPAdapter(
|
||||
max_retries=Retry(total=5, 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],
|
||||
retry_after_max=MAX_BACKOFF,
|
||||
),
|
||||
pool_maxsize=64,
|
||||
pool_block=True,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user