Merge pull request #3334 from hroff-1902/retrier-dependency-exceptions

Do not throttle with DependencyException in Exchange retrier
This commit is contained in:
Matthias 2020-05-18 19:49:24 +02:00 committed by GitHub
commit 839ca28604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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