mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Show API backoff in logs to better investigate eventual problems)
This commit is contained in:
parent
c9c43d2f0b
commit
d77c53960d
|
@ -112,7 +112,7 @@ def retrier_async(f):
|
|||
kwargs.update({'count': count})
|
||||
if isinstance(ex, DDosProtection):
|
||||
backoff_delay = calculate_backoff(count + 1, API_RETRY_COUNT)
|
||||
logger.debug(f"Applying DDosProtection backoff delay: {backoff_delay}")
|
||||
logger.info(f"Applying DDosProtection backoff delay: {backoff_delay}")
|
||||
await asyncio.sleep(backoff_delay)
|
||||
return await wrapper(*args, **kwargs)
|
||||
else:
|
||||
|
@ -137,7 +137,7 @@ def retrier(_func=None, retries=API_RETRY_COUNT):
|
|||
if isinstance(ex, DDosProtection) or isinstance(ex, RetryableOrderError):
|
||||
# increasing backoff
|
||||
backoff_delay = calculate_backoff(count + 1, retries)
|
||||
logger.debug(f"Applying DDosProtection backoff delay: {backoff_delay}")
|
||||
logger.info(f"Applying DDosProtection backoff delay: {backoff_delay}")
|
||||
time.sleep(backoff_delay)
|
||||
return wrapper(*args, **kwargs)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user