mirror of
https://github.com/cachix/stamina.hs.git
synced 2024-09-11 18:37:48 +03:00
README: formatting
This commit is contained in:
parent
5d52cc1339
commit
b7ea9ec966
13
README.md
13
README.md
@ -24,10 +24,17 @@ data RetryStatus = RetryStatus
|
||||
}
|
||||
|
||||
-- Retry on all sync exceptions
|
||||
retry :: MonadIO m => RetrySettings -> (RetryStatus -> m a) -> m a
|
||||
retry :: MonadIO m
|
||||
=> RetrySettings
|
||||
-> (RetryStatus -> m a)
|
||||
-> m a
|
||||
|
||||
-- Retry on specific exceptions
|
||||
retryOnExceptions :: (Exception e, MonadIO m) => RetrySettings -> [Handler RetryAction] -> (RetryStatus -> m a) -> m a
|
||||
retryOnExceptions :: (Exception e, MonadIO m)
|
||||
=> RetrySettings
|
||||
-> [Handler RetryAction]
|
||||
-> (RetryStatus -> m a)
|
||||
-> m a
|
||||
|
||||
data RetryAction = Skip | Retry | RetryAfter Int
|
||||
```
|
||||
@ -56,4 +63,4 @@ main = do
|
||||
## Credits
|
||||
|
||||
- Heavily inspired by [stamina for Python](https://stamina.hynek.me/en/stable/tutorial.html#retries).
|
||||
- [retry](https://github.com/Soostone/retry) as case study for what needs to be supported
|
||||
- [retry](https://github.com/Soostone/retry) as case study for what needs to be supported.
|
Loading…
Reference in New Issue
Block a user