conbench / conbenchcoms

Communicate with the conbench API in R
Other
0 stars 0 forks source link

Add retries to all API calls #23

Closed boshek closed 11 months ago

boshek commented 11 months ago

Closes #22 by adding a retry. From the {httr2} docs:

httr2 will use "truncated exponential backoff with full jitter", i.e. it will wait a random amount of time between one second and 2 ^ tries seconds, capped to at most 60 seconds. In other words, it waits runif(1, 1, 2) seconds after the first failure, runif(1, 1, 4) after the second, runif(1, 1, 8) after the third, and so on. If you'd prefer a different strategy, you can override the default with backoff.