module Retriable
Overview
# include it scoped to the Retriable module
require "retriable"
Retriable.retry do
# ...
end
# or include it into top level namespace
require "retriable/core_ext/kernel"
retry do
# ...
end
Included Modules
- Habitat::SettingsHelpers
- Habitat::TempConfig
Extended Modules
Defined in:
retriable.crretriable/core_ext/kernel.cr
retriable/exponential_backoff.cr
retriable/settings.cr
retriable/version.cr
Constant Summary
-
HABITAT_SETTINGS =
[{decl: max_attempts : Int32 | ::Nil, example: nil, validation: nil}, {decl: except : Exception.class | Array(Exception.class) | Nil, example: nil, validation: nil}, {decl: on : Exception.class | Array(Exception.class) | Nil, example: nil, validation: nil}, {decl: on_retry : Proc(Exception, Int32, Time::Span, Time::Span, Nil) | ::Nil, example: nil, validation: nil}, {decl: base_interval : Time::Span = 0.5.seconds, example: nil, validation: nil}, {decl: max_elapsed_time : Time::Span = 15.minutes, example: nil, validation: nil}, {decl: max_interval : Time::Span = 1.minute, example: nil, validation: nil}, {decl: multiplier : Float64 = 1.5, example: nil, validation: nil}, {decl: sleep_disabled : Bool = false, example: nil, validation: nil}, {decl: rand_factor : Float64 = 0.5, example: nil, validation: nil}, {decl: random : Random = Random::DEFAULT, example: nil, validation: nil}, {decl: intervals : Array(Time::Span) | ::Nil, example: nil, validation: nil}, {decl: backoff : Bool = true, example: nil, validation: nil}] of Nil
-
VERSION =
"0.2.0"
Class Method Summary
Instance Method Summary
- #retry
-
#retry(on = nil, **opts, &)
ameba:disable Metrics/CyclomaticComplexity
- #settings