Learn R Programming

datarobot (version 2.8.0)

StartRetryWaiter: Creates a waiter function that can be used in a loop while trying some task many times. The waiter sleeps while waiting to try again, with sleep times determined by exponential back-off.

Description

Creates a waiter function that can be used in a loop while trying some task many times. The waiter sleeps while waiting to try again, with sleep times determined by exponential back-off.

Usage

StartRetryWaiter(timeout = NULL, delay = 0.1, maxdelay = 1)

Arguments

timeout

integer. How long (in seconds) to keep trying before timing out (NULL means no timeout)

delay

integer. Initial delay between tries (in seconds).

maxdelay

integer. Maximim delay (in seconds) between tries.

Value

function which gets the waiter status. This function returns a list with these items: /itemize /item index numeric. How many times we have waited. /item secondsWaited numeric. How long (in seconds) since we started the timer. /item stillTrying logical. Whether we should keep trying or give up (logical)