diff --git a/src/Stamina.hs b/src/Stamina.hs index 910d7ba..0c4e280 100644 --- a/src/Stamina.hs +++ b/src/Stamina.hs @@ -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.