DefaultRetryPolicy

DefaultRetryPolicy

By default job will be retried 3 times with 1, 2 and 3 second delays for any error = new DefaultRetryPolicy(3)

Constructor

new DefaultRetryPolicy(retries)

Source:

Constructor

Parameters:
Name Type Description
retries numbe

Methods

delay() → {Promise}

Source:

Delay for retrying

Returns:

promise

Type
Promise

errorIsRetriable() → {boolean}

Source:

Check if error is retryable

Returns:

true

Type
boolean

run(runFun) → {Promise}

Source:

Run

Parameters:
Name Type Description
runFun function

function to run

Returns:

promise

Type
Promise