Class: PhobosDBCheckpoint::RetryFailure

Inherits:
Object
  • Object
show all
Includes:
Handler
Defined in:
lib/phobos_db_checkpoint/actions/retry_failure.rb

Instance Method Summary collapse

Methods included from Handler

#ack, #around_consume, included, #retry_consume?

Constructor Details

#initialize(failure) ⇒ RetryFailure

Returns a new instance of RetryFailure.



7
8
9
10
# File 'lib/phobos_db_checkpoint/actions/retry_failure.rb', line 7

def initialize(failure)
  @failure = failure
  @action_taken = nil
end

Instance Method Details

#performObject



12
13
14
15
16
17
18
19
# File 'lib/phobos_db_checkpoint/actions/retry_failure.rb', line 12

def perform
  around_consume(payload, ) do
    @action_taken = handler.consume(payload, )
  end

  @failure.destroy
  @action_taken
end