-
Notifications
You must be signed in to change notification settings - Fork 36
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
Feature: "Reset time" option for tries #32
Comments
I'm not sure I fully understand your message. |
I try to explain it with art of pseudo code:
Now my idea: An option to tell retryable: retry this 3 times. after x seconds reset tries back to 0, so i have 3 tries again. Failure example: Mysql server is restarted in 10 seconds => short problem, tries resetted, script working again |
Wouldn't a combination of https://github.com/nfedyashev/retryable#matching-error-messages - that's how you can check how many tries did it make. |
Thanks i will try it. |
Some kind of "reset time" option for tries would be nice.
When this option is set it should reset the tries count back to 0.
Why could this be useful?
I wrote a script that connects to a mysql server, sometimes i need to restart the server, so i wrapped my code with this gem.
When the server is restarting, a exception is raised, then it waits 10 seconds, the server is online again end everything is fine,
except i restart the server multiple times a week then the tries count is reached an the script stops.
but if i could define a timeout after the tries count is resetted this would work perfect.
sorry for my bad english, i hope you can understand what i mean.
The text was updated successfully, but these errors were encountered: