r-lib / httr

httr: a friendly http package for R
https://httr.r-lib.org
Other
986 stars 1.99k forks source link

Error in retry doc #723

Closed persep closed 1 year ago

persep commented 1 year ago

In the file retry.R it says:

#' @param pause_base,pause_cap This method uses exponential back-off with
#'   full jitter - this means that each request will randomly wait between 0
#'   and `pause_base * 2 ^ attempt` seconds, up to a maximum of
#'   `pause_cap` seconds.

When it should say :

#' @param pause_base,pause_cap This method uses exponential back-off with
#'   full jitter - this means that each request will randomly wait between 1
#'   and `pause_base * 2 ^ attempt` seconds, up to a maximum of
#'   `pause_cap` seconds.

As per the backoff_full_jitter function definition where pause_min = 1:

backoff_full_jitter <- function(i, resp, pause_base = 1, pause_cap = 60,
                                pause_min = 1, quiet = FALSE)