Exception: Amigo::Retry::Retry
- Defined in:
- lib/amigo/retry.rb
Overview
Raise this class, or a subclass of it, to schedule a later retry, rather than using an error to trigger Sidekiq’s default retry behavior. The benefit here is that it allows a consistent, customizable behavior, so is better for ‘expected’ errors like rate limiting.
Instance Attribute Summary collapse
-
#interval_or_timestamp ⇒ Object
Returns the value of attribute interval_or_timestamp.
Instance Method Summary collapse
-
#initialize(interval_or_timestamp, msg = nil) ⇒ Retry
constructor
A new instance of Retry.
Constructor Details
#initialize(interval_or_timestamp, msg = nil) ⇒ Retry
Returns a new instance of Retry.
29 30 31 32 |
# File 'lib/amigo/retry.rb', line 29 def initialize(, msg=nil) @interval_or_timestamp = super(msg || "retry job in #{}") end |
Instance Attribute Details
#interval_or_timestamp ⇒ Object
Returns the value of attribute interval_or_timestamp.
27 28 29 |
# File 'lib/amigo/retry.rb', line 27 def @interval_or_timestamp end |