Skip to content
New issue

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

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

Already on GitHub? # to your account

Add support for retry options #12

Closed
ecampidoglio opened this issue Jan 2, 2018 · 4 comments
Closed

Add support for retry options #12

ecampidoglio opened this issue Jan 2, 2018 · 4 comments

Comments

@ecampidoglio
Copy link
Member

Curl has built-in functionality to automatically retry a failed request. This behavior is controlled primarily with three options:

By default, curl will increment the delay between attempts by doubling the last waiting time, starting from 1 second until it reaches the value specified in --retry-max-time or 10 minutes. Although this behavior should cover most scenarios, it's possible to override it by setting a fixed delay right from the start with the --retry-delay option

It would be nice if Cake.Curl exposed these options through the CurlSettings class.

@ecampidoglio ecampidoglio changed the title Add support for retrying options Add support for retry options Jan 2, 2018
@ecampidoglio ecampidoglio added this to the 2.1.0 milestone Jan 2, 2018
@ecampidoglio ecampidoglio modified the milestones: 2.1.0, 3.0, 3.1 May 16, 2018
@deqenq
Copy link
Member

deqenq commented Feb 24, 2019

@ecampidoglio Can I take care of this issue? I also suggest to support options --retry-connrefused (since curl version 7.52.0) , --max-time and --connect-timeout. All these options relates to controlling retry mechanism.

@ecampidoglio
Copy link
Member Author

@deqenq Sure! I think it's a good idea to include --retry-connrefused, but I would rather treat --max-time and --connect-timeout as a separate feature. Even though they do affect the retry mechanism, these options have a larger scope.

@deqenq
Copy link
Member

deqenq commented Mar 2, 2019

@ecampidoglio PR sent. Added configuration options:

Later I will add these two options in separate PR:

@ecampidoglio
Copy link
Member Author

@deqenq Merged in 1bb6a24. Thank you for your contribution! 🎉

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants