Class: Sbmt::Outbox::RetryStrategies::LatestAvailable
- Inherits:
-
Base
- Object
- DryInteractor
- Base
- Sbmt::Outbox::RetryStrategies::LatestAvailable
- Defined in:
- app/interactors/sbmt/outbox/retry_strategies/latest_available.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from DryInteractor
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/interactors/sbmt/outbox/retry_strategies/latest_available.rb', line 7 def call unless item.has_attribute?(:event_key) return Failure(:missing_event_key) end if item.event_key.nil? return Failure(:empty_event_key) end if delivered_later? Failure(:discard_item) else Success() end end |