ropensci-archive / MODISTools

Repository moved
https://github.com/bluegreen-labs/MODISTools/
Other
50 stars 26 forks source link

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

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.

khufkens commented 4 years ago

Hi Anna,

seems like a good fix for server instability issues. Didn't know the function existed. Seems like the default try value is set to 3 which is reasonable, don't want to hang the process.

Thanks!