-
Notifications
You must be signed in to change notification settings - Fork 9
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 request: Max duration including execution time #3
Comments
Hi, I've been thinking to add such feature for a while now. Currently, we can put something like: (safely
(api-call "other-system")
:on-error
:max-retries 5
:default {:some :value}) The above code will retry the Similarly, we could have something like: (safely
(api-call "other-system")
:on-error
:max-retries-duration (* 2 60 1000) ;; 2mins
:default {:some :value}) The code above will work similarly, it will keep retrying until the The (safely
(api-call "other-system")
:on-error
:max-retries 5
:max-retries-duration (* 2 60 1000) ;; 2mins
:default {:some :value}) One thing to point out is that This is because there is no control on the execution path over the So if you wanted to retry for at most 2min otherwise give up and regain control this is what you would need to do: (safely
(api-call "other-system")
:on-error
:max-retries-duration (* 2 60 1000) ;; 2mins
:circuit-breaker :operation1
:timeout (* 2 60 1000) ;; 2mins
:default {:some :value}) Does this make sense? |
I think having a time bound retry mechanism would be really useful. +1 from me |
@BrunoBonacci Thank you for your awesome explanation. For me, what I was looking for was the time out feature along with circuit breaker. I think this feature already exist so no new feature is needed for me. I don't know if anyone wants the new |
In a use case such as:
if we want to retry calling an external service only until the caller of our service times out, etc.
It would be nice to be able to set max duration and retry interval.
The text was updated successfully, but these errors were encountered: