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

wp-cli core download add retry flag #155

Open
centminmod opened this issue May 16, 2020 · 2 comments
Open

wp-cli core download add retry flag #155

centminmod opened this issue May 16, 2020 · 2 comments

Comments

@centminmod
Copy link

Feature Request

Describe your use case and the problem you are facing

If downloads.wordpress site has connectivity issues, wp core download will timeout

Error: Failed to get url 'https://downloads.wordpress.org/release/wordpress-5.4.1.tar.gz.md5': cURL error 28: Connection timed out after 10001 milliseconds.

Describe the solution you'd like

If the underlying download client is curl, why not add flags that allow curl to retry the download if there are issues ? like

wp core download --retry 5

to retry download 5 times

wp core download --retry 5 --retry-delay 10

to retry download 5 times but wait 10 seconds between retries

equivalent curl commands you can replicate in wp cli

curl --help | grep try
     --happy-eyeballs-timeout-ms <milliseconds> How long to wait in milliseconds for IPv6 before trying IPv4
     --retry <num>   Retry request if transient problems occur
     --retry-connrefused Retry on connection refused (use with --retry)
     --retry-delay <seconds> Wait time between retries
     --retry-max-time <seconds> Retry only within this period
@danielbachhuber
Copy link
Member

I don't know that I'd implement all of curl's options, but a --retry=5 or similar flag seems reasonable.

@abhi3315
Copy link

I am taking this issue.

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

No branches or pull requests

3 participants