ropensci / MODIStsp

An "R" package for automatic download and preprocessing of MODIS Land Products Time Series
https://docs.ropensci.org/MODIStsp
GNU General Public License v3.0
155 stars 51 forks source link

replace httr::GET() with httr::RETRY() #199

Closed annnvv closed 4 years ago

annnvv commented 4 years ago

Thanks for this awesome project!

In this PR, I'd like to propose swapping out calls to httr::GET() etc. with httr::RETRY(). This will make the package more resilient to transient problems like brief network outages or periods where the service(s) it hits are overwhelmed. In my experience, using retry logic almost always improves the user experience with HTTP clients.

I'm working on chircollab/chircollab20#1 as part of Chicago R Collab, an R 'unconference' in Chicago.

lbusett commented 4 years ago

@annnvv Thanks for the PR. Consider however that MODIStsp already uses a "retry" scheme based on a while loop (it is implemented like this because a different downloader can be also used, and that one can not use a RETRY)