Do not throttle with DependencyException in retrier

This commit is contained in:
hroff-1902 2020-05-18 17:31:34 +03:00
parent 5858f3a845
commit 6951b20aa0

View File

@ -1,6 +1,6 @@
import logging
from freqtrade.exceptions import DependencyException, TemporaryError
from freqtrade.exceptions import TemporaryError
logger = logging.getLogger(__name__)
@ -93,7 +93,7 @@ def retrier_async(f):
count = kwargs.pop('count', API_RETRY_COUNT)
try:
return await f(*args, **kwargs)
except (TemporaryError, DependencyException) as ex:
except TemporaryError as ex:
logger.warning('%s() returned exception: "%s"', f.__name__, ex)
if count > 0:
count -= 1
@ -111,7 +111,7 @@ def retrier(f):
count = kwargs.pop('count', API_RETRY_COUNT)
try:
return f(*args, **kwargs)
except (TemporaryError, DependencyException) as ex:
except TemporaryError as ex:
logger.warning('%s() returned exception: "%s"', f.__name__, ex)
if count > 0:
count -= 1