Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max_retries #182

Open
axshani opened this issue Nov 29, 2022 · 1 comment
Open

max_retries #182

axshani opened this issue Nov 29, 2022 · 1 comment

Comments

@axshani
Copy link

axshani commented Nov 29, 2022

Hi!
I'm using @on_predicate and sending max_retries parameter 0.
I saw that the failing requests are continue to fire and tried to debug.
I think that in case of 0 max_retries the backoff library is entering a infinite loop and keeps on trying the failing request.

tries += 1
there is a check tries == max_tries
tries is starting at 1 and max_tries is always 0 in my case.
Also, what will heppend if I will pass a negative max_tries parameter?

please fix this
thanks

@nachitox
Copy link

nachitox commented Feb 7, 2023

max_tries_exceeded = (tries == max_tries_value)

max_tries_exceeded = (tries == max_tries_value)

It should be max_tries_exceeded = tries >= max_tries_value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants