Merge isinstance
calls
Signed-off-by: shubhendra <withshubh@gmail.com>
This commit is contained in:
parent
45da3a7022
commit
4d81834912
@ -140,7 +140,7 @@ def retrier(_func=None, retries=API_RETRY_COUNT):
|
|||||||
logger.warning('retrying %s() still for %s times', f.__name__, count)
|
logger.warning('retrying %s() still for %s times', f.__name__, count)
|
||||||
count -= 1
|
count -= 1
|
||||||
kwargs.update({'count': count})
|
kwargs.update({'count': count})
|
||||||
if isinstance(ex, DDosProtection) or isinstance(ex, RetryableOrderError):
|
if isinstance(ex, (DDosProtection, RetryableOrderError)):
|
||||||
# increasing backoff
|
# increasing backoff
|
||||||
backoff_delay = calculate_backoff(count + 1, retries)
|
backoff_delay = calculate_backoff(count + 1, retries)
|
||||||
logger.info(f"Applying DDosProtection backoff delay: {backoff_delay}")
|
logger.info(f"Applying DDosProtection backoff delay: {backoff_delay}")
|
||||||
|
Loading…
Reference in New Issue
Block a user