Fix calculate_backoff implementation

This commit is contained in:
Matthias
2020-06-28 19:40:33 +02:00
parent cbcbb4bdb5
commit 6362bfc36e
2 changed files with 11 additions and 11 deletions

View File

@@ -91,11 +91,11 @@ MAP_EXCHANGE_CHILDCLASS = {
}
def calculate_backoff(retry, max_retries):
def calculate_backoff(retrycount, max_retries):
"""
Calculate backoff
"""
return retry ** 2 + 1
return (max_retries - retrycount) ** 2 + 1
def retrier_async(f):