mirror of
https://github.com/cachix/stamina.hs.git
synced 2024-10-05 14:38:04 +03:00
Add indefiniteDefaults
This commit is contained in:
parent
d24f05288b
commit
5f65932602
@ -7,6 +7,7 @@ module Stamina
|
||||
-- types
|
||||
RetrySettings (..),
|
||||
defaults,
|
||||
indefiniteDefaults,
|
||||
RetryAction (..),
|
||||
RetryStatus (..),
|
||||
-- raising exceptions
|
||||
@ -75,6 +76,13 @@ defaults =
|
||||
backoffExpBase = 2.0
|
||||
}
|
||||
|
||||
indefiniteDefaults :: RetrySettings
|
||||
indefiniteDefaults =
|
||||
defaults
|
||||
{ maxTime = Nothing,
|
||||
maxAttempts = Nothing
|
||||
}
|
||||
|
||||
data RetryAction
|
||||
= RaiseException -- Propagate the exception.
|
||||
| Retry -- Retry with the delay according to the settings.
|
||||
|
Loading…
Reference in New Issue
Block a user