powered by
Repeatedly retry a function while it keeps returning FALSE and exit the loop when it returns TRUE
FALSE
TRUE
crew_retry( fun, args = list(), seconds_interval = 1, seconds_timeout = 60, max_tries = Inf, error = TRUE, message = character(0), envir = parent.frame() )
NULL (invisibly).
NULL
Function that returns FALSE to keep waiting or TRUE to stop waiting.
A named list of arguments to fun.
fun
Nonnegative numeric of length 1, number of seconds to wait between calls to fun.
Nonnegative numeric of length 1, number of seconds to loop before timing out.
Maximum number of calls to fun to try before giving up.
Whether to throw an error on a timeout or max tries.
Character of length 1, optional error message if the wait times out.
Environment to evaluate fun.
Other utilities: crew_assert(), crew_deprecate(), crew_eval(), crew_random_name(), crew_worker()
crew_assert()
crew_deprecate()
crew_eval()
crew_random_name()
crew_worker()
crew_retry(fun = function() TRUE)
Run the code above in your browser using DataLab