Option "retry"

Table of Contents

Setting the "retry" option provides control over how many time an action is reexecuted on error before it is finally treated as a failure.

It is expected to be used conjointly with the "attempt" option which provide an indicator over how many times an action was rescheduled.


The value must be an integer superior or egal to 1. For exemple, the value 3 means the action will be executed at maximum 3 times. If the third time the action fail, then it will be handled by the Nikita session as a failed action.

count = 0
.call({ attempt: 3 }, function(){
  assert(count, 3)

The default value is "1" which means that actions are not rescheduled on error.