1
0
mirror of https://github.com/acgnhiki/blrec.git synced 2025-04-25 05:00:23 +08:00

refactor: refactor segment fetcher

retry base exceptions to avoid segments lost
This commit is contained in:
acgnhik 2022-08-01 12:22:05 +08:00
parent bff910930b
commit df04e90c80

View File

@ -119,12 +119,7 @@ class SegmentFetcher:
@retry(
reraise=True,
retry=retry_if_exception_type(
(
requests.exceptions.Timeout,
requests.exceptions.HTTPError,
urllib3.exceptions.TimeoutError,
urllib3.exceptions.ProtocolError,
)
(requests.exceptions.RequestException, urllib3.exceptions.HTTPError)
),
wait=wait_exponential(multiplier=0.1, max=5),
stop=stop_after_delay(60),