GlobalFishingWatch / gfwr

R package for accessing data from Global Fishing Watch APIs
https://globalfishingwatch.github.io/gfwr/
Apache License 2.0
58 stars 7 forks source link

Add retry strategy #134

Closed AndreaSanchezTapia closed 1 month ago

AndreaSanchezTapia commented 4 months ago

As Andrés explained: "Usually, the API [should] tell you "I'm too busy, call me back later" when it's in the middle of some process and it can't handle the request. Usually returning 413 + header "retry-after" to let the client know when it should be safe to retry the request.... This requires both changes to the R client and the API."

AndreaSanchezTapia commented 2 months ago

Closing for now because last_report has been a good solution. We can reopen this if needed.

AndreaSanchezTapia commented 2 months ago

@giselamo has given us the feedback that get_last_report() should work inside get_raster(). We should discuss the pros, cons and difficulty of this in the short future. Also what other retry instances would be good to have.