attempt icon indicating copy to clipboard operation
attempt copied to clipboard

Initial Delay does not seem to be respected

Open Banashek opened this issue 6 years ago • 1 comments

Running some tests, it seems as though setting initialDelay does not affect the initial start time for the delay.

Setting delay however will reduce the initial start delay.

Banashek avatar Oct 14 '18 00:10 Banashek

@Banashek the code is fairly straight-forward for handling initial delay. See https://github.com/lifeomic/attempt/blob/master/src/index.ts#L191

The only case when initialDelay is ignored is when you provide a calcualateDelay function via the options. If calcualateDelay is provided then the return value from the function will override all other default delay calculations.

Please provide examples of breaking test case (preferably in a pull request) if you can reproduce this problem.

philidem avatar Oct 15 '18 13:10 philidem