Execute first attempt immediately
satazor opened this issue · 2 comments
satazor commented
According to the formula, a minTimeout
of 1000ms
will always execute the first attempt after 1000ms
(assuming randomize: false
).
Is there a way to make retry
attempt immediately (perhaps on process.nextTick
)?
Note that putting the minTimeout
value to 1ms
will do it but then we don't get any benefit of the backoff.
satazor commented
I'm doing this ugly hack for now:
operation = retry.operation(options);
operation._timeouts[0] = 0; // Force first immediately
satazor commented
nvm ignore me.