Class: Kitsune::Kit::Workflows::Rollback

Inherits:
Base
  • Object
show all
Defined in:
lib/kitsune/kit/workflows/rollback.rb

Instance Method Summary collapse

Constructor Details

#initialize(config:, operations:, state_store: nil, event_bus: Events::NullBus.new, clock: Clock.new) ⇒ Rollback

Returns a new instance of Rollback.



10
11
12
13
14
# File 'lib/kitsune/kit/workflows/rollback.rb', line 10

def initialize(config:, operations:, state_store: nil, event_bus: Events::NullBus.new, clock: Clock.new)
  super(config: config, event_bus: event_bus, clock: clock)
  @operations = operations
  @state_store = state_store
end

Instance Method Details

#callObject



16
17
18
19
20
# File 'lib/kitsune/kit/workflows/rollback.rb', line 16

def call
  return call_unlocked unless @state_store

  @state_store.with_execution_lock(config.environment) { call_unlocked }
end