Module: Retry
- Defined in:
- lib/entitlements/config/retry.rb
Class Method Summary collapse
-
.setup! ⇒ Object
This method should be called as early as possible in the startup of your application It sets up the Retryable gem with custom contexts and passes through a few options Should the number of retries be reached without success, the last exception will be raised.
Class Method Details
.setup! ⇒ Object
This method should be called as early as possible in the startup of your application It sets up the Retryable gem with custom contexts and passes through a few options Should the number of retries be reached without success, the last exception will be raised
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/entitlements/config/retry.rb', line 9 def self.setup! ######## Retryable Configuration ######## # All defaults available here: # https://github.com/nfedyashev/retryable/blob/6a04027e61607de559e15e48f281f3ccaa9750e8/lib/retryable/configuration.rb#L22-L33 Retryable.configure do |config| config.contexts[:default] = { on: [StandardError], sleep: 1, tries: 3 } end end |