Class: CommandTower::Messaging::Execution::Recovery
- Inherits:
-
Object
- Object
- CommandTower::Messaging::Execution::Recovery
- Defined in:
- app/services/command_tower/messaging/execution/recovery.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(grace_window: Messaging::DeliveryRetryPolicy::GRACE_WINDOW, max_attempts: Messaging::DeliveryRetryPolicy::MAX_ATTEMPTS) ⇒ Recovery
constructor
A new instance of Recovery.
Constructor Details
#initialize(grace_window: Messaging::DeliveryRetryPolicy::GRACE_WINDOW, max_attempts: Messaging::DeliveryRetryPolicy::MAX_ATTEMPTS) ⇒ Recovery
Returns a new instance of Recovery.
14 15 16 17 18 19 20 |
# File 'app/services/command_tower/messaging/execution/recovery.rb', line 14 def initialize( grace_window: Messaging::DeliveryRetryPolicy::GRACE_WINDOW, max_attempts: Messaging::DeliveryRetryPolicy::MAX_ATTEMPTS ) @grace_window = grace_window @max_attempts = max_attempts end |
Class Method Details
.call(grace_window: Messaging::DeliveryRetryPolicy::GRACE_WINDOW, max_attempts: Messaging::DeliveryRetryPolicy::MAX_ATTEMPTS) ⇒ Object
7 8 9 10 11 12 |
# File 'app/services/command_tower/messaging/execution/recovery.rb', line 7 def self.call( grace_window: Messaging::DeliveryRetryPolicy::GRACE_WINDOW, max_attempts: Messaging::DeliveryRetryPolicy::MAX_ATTEMPTS ) new(grace_window:, max_attempts:).call end |
Instance Method Details
#call ⇒ Object
22 23 24 25 26 |
# File 'app/services/command_tower/messaging/execution/recovery.rb', line 22 def call recover_queued! recover_failed! recover_stale_executing! end |