retry_patiently: Evaluate an expression with retries, waiting between tries

Description Usage Arguments

View source: R/retry_patiently.R

Description

Waits progressively longer before each next try (at least by default; wait times can be customized).

Usage

1
2
retry_patiently(expr, max_wait_times = c(0, 3^c(0:4)),
  min_wait_frac = 0.5, verbose = FALSE)

Arguments

expr

expression to evaluate

max_wait_times

vector of maximum wait times, in seconds, before trying the 1st, 2nd, etc. time. The length of this vector is the maximum number of tries.

min_wait_frac

numeric between 0 and 1. If < 1, the actual wait time before try i will be a uniform random value selected from the range (min_wait_frac*max_wait_times[i], max_wait_times[i]). Modeled loosely on https://github.com/r-lib/httr/blob/master/R/retry.R.


USGS-R/scipiper documentation built on Aug. 14, 2018, 5:23 a.m.