mirror of
https://github.com/cachix/stamina.hs.git
synced 2024-09-11 18:37:48 +03:00
fix docs formatting
This commit is contained in:
parent
d71088dd52
commit
32b7af0901
@ -70,4 +70,4 @@ go2 = Stamina.retryFor Stamina.defaults handler $ \retryStatus -> do
|
||||
```haskell
|
||||
main = undefined
|
||||
```
|
||||
</details>
|
||||
</details>
|
||||
|
@ -85,15 +85,19 @@ data RetryAction
|
||||
-- The backoff delays between retries grow exponentially plus a random jitter.
|
||||
-- The backoff for retry attempt number _attempt_ is computed as:
|
||||
--
|
||||
-- @
|
||||
-- backoffExpBase ** (attempt - 1) + random(0, backoffJitter)
|
||||
-- @
|
||||
--
|
||||
-- With the default values, the backoff for the first 5 attempts will be:
|
||||
--
|
||||
-- @
|
||||
-- 2 ** 0 + random(0, 1) = 1 + random(0, 1)
|
||||
-- 2 ** 1 + random(0, 1) = 2 + random(0, 1)
|
||||
-- 2 ** 2 + random(0, 1) = 4 + random(0, 1)
|
||||
-- 2 ** 3 + random(0, 1) = 8 + random(0, 1)
|
||||
-- 2 ** 4 + random(0, 1) = 16 + random(0, 1)
|
||||
-- @
|
||||
--
|
||||
-- If all retries fail, the last exception is let through.
|
||||
retry :: (MonadCatch m, MonadIO m) => RetrySettings -> (RetryStatus -> m a) -> m a
|
||||
|
Loading…
Reference in New Issue
Block a user