Class: Mammoth::Commands::DeadLettersCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/mammoth/commands/dead_letters_command.rb

Overview

Reusable local command object for dead-letter inspection and replay.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv, state_adapter: nil, lifecycle_hooks: LifecycleHooks.new) ⇒ DeadLettersCommand

Returns a new instance of DeadLettersCommand.

Parameters:



12
13
14
15
16
# File 'lib/mammoth/commands/dead_letters_command.rb', line 12

def initialize(argv, state_adapter: nil, lifecycle_hooks: LifecycleHooks.new)
  @argv = argv
  @state_adapter = state_adapter
  @lifecycle_hooks = lifecycle_hooks
end

Instance Attribute Details

#argvObject (readonly)

Returns the value of attribute argv.



7
8
9
# File 'lib/mammoth/commands/dead_letters_command.rb', line 7

def argv
  @argv
end

#lifecycle_hooksObject (readonly)

Returns the value of attribute lifecycle_hooks.



7
8
9
# File 'lib/mammoth/commands/dead_letters_command.rb', line 7

def lifecycle_hooks
  @lifecycle_hooks
end

#state_adapterObject (readonly)

Returns the value of attribute state_adapter.



7
8
9
# File 'lib/mammoth/commands/dead_letters_command.rb', line 7

def state_adapter
  @state_adapter
end

Instance Method Details

#callInteger

Returns process-style status code.

Returns:

  • (Integer)

    process-style status code



19
20
21
# File 'lib/mammoth/commands/dead_letters_command.rb', line 19

def call
  DeadLetterCommands.call(argv, state_adapter: state_adapter, lifecycle_hooks: lifecycle_hooks)
end