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

Add support for WaitTime and MaxWaitTime for retries #64

Closed
bak1an opened this issue Mar 30, 2017 · 3 comments · Fixed by #66
Closed

Add support for WaitTime and MaxWaitTime for retries #64

bak1an opened this issue Mar 30, 2017 · 3 comments · Fixed by #66
Assignees

Comments

@bak1an
Copy link
Contributor

bak1an commented Mar 30, 2017

Currently client does not expose a way to configure wait times for retry, only conditions and retry count are configurable -

}, Retries(r.client.RetryCount), RetryConditions(r.client.RetryConditions))

We need to make wait times configurable as well, default 100ms wait time is too little in my case.

I can provide a pull request for this if the issue is valid

@bak1an
Copy link
Contributor Author

bak1an commented Mar 30, 2017

I am also wondering why retry config functions and Backoff function were made public in https://github.com/go-resty/resty/blob/master/retry.go ?

Was the idea to let user wrap client.Execute(...) into an anonymous function and pass it to Backoff?

@jeevatkm
Copy link
Member

@bak1an Configurable option is good. Feel free to send PR.

Yes, that was my thought when I made those as public.

@jeevatkm jeevatkm self-assigned this Mar 30, 2017
@jeevatkm jeevatkm added this to the v0.12 Milestone milestone Mar 30, 2017
@bak1an
Copy link
Contributor Author

bak1an commented Apr 3, 2017

Great, will be on it during the week

@jeevatkm jeevatkm changed the title Unable to set WaitTime and MaxWaitTime for retries Add support for WaitTime and MaxWaitTime for retries Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants