Skip to content

Commit

Permalink
Merge pull request #123 from mganisin/retry_wait_for_tenant
Browse files Browse the repository at this point in the history
Change strategy for wait_for_tenant
  • Loading branch information
Marian Ganisin authored Jul 7, 2022
2 parents dfbd6b7 + ab931c9 commit b0dc196
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion threescale_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def __init__(self, url: str, token: str,
# here to mitigate the problem. This requires proper fix in checks
time.sleep(wait)

@backoff.on_predicate(backoff.fibo, lambda ready: not ready, max_tries=8, jitter=None)
@backoff.on_predicate(
backoff.constant, lambda ready: not ready, interval=6, max_tries=90, jitter=None)
def wait_for_tenant(self) -> bool:
"""
When True is returned, there is some chance the tenant is actually ready.
Expand Down

0 comments on commit b0dc196

Please sign in to comment.