1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-27 01:57:33 +00:00
This commit is contained in:
Louis Vézina 2020-08-13 09:32:50 -04:00
parent f7f30a4157
commit c496af6fc4

View file

@ -30,7 +30,8 @@ hours_until_end_of_day = time_until_end_of_day().seconds // 3600 + 1
VALID_THROTTLE_EXCEPTIONS = (TooManyRequests, DownloadLimitExceeded, ServiceUnavailable, APIThrottled, VALID_THROTTLE_EXCEPTIONS = (TooManyRequests, DownloadLimitExceeded, ServiceUnavailable, APIThrottled,
ParseResponseError, IPAddressBlocked) ParseResponseError, IPAddressBlocked)
VALID_COUNT_EXCEPTIONS = ('TooManyRequests', 'ServiceUnavailable', 'APIThrottled', requests.Timeout, socket.timeout) VALID_COUNT_EXCEPTIONS = ('TooManyRequests', 'ServiceUnavailable', 'APIThrottled', requests.Timeout,
requests.ReadTimeout, socket.timeout)
PROVIDER_THROTTLE_MAP = { PROVIDER_THROTTLE_MAP = {
"default": { "default": {
@ -39,8 +40,9 @@ PROVIDER_THROTTLE_MAP = {
ServiceUnavailable: (datetime.timedelta(minutes=20), "20 minutes"), ServiceUnavailable: (datetime.timedelta(minutes=20), "20 minutes"),
APIThrottled: (datetime.timedelta(minutes=10), "10 minutes"), APIThrottled: (datetime.timedelta(minutes=10), "10 minutes"),
ParseResponseError: (datetime.timedelta(hours=6), "6 hours"), ParseResponseError: (datetime.timedelta(hours=6), "6 hours"),
requests.Timeout: (datetime.timedelta(minutes=20), "20 minutes"), requests.Timeout: (datetime.timedelta(hours=1), "1 hour"),
socket.timeout: (datetime.timedelta(minutes=20), "20 minutes"), socket.timeout: (datetime.timedelta(hours=1), "1 hour"),
requests.ReadTimeout: (datetime.timedelta(hours=1), "1 hour"),
}, },
"opensubtitles": { "opensubtitles": {
TooManyRequests: (datetime.timedelta(hours=3), "3 hours"), TooManyRequests: (datetime.timedelta(hours=3), "3 hours"),