Class: Kitsune::Kit::Workflows::DestroyServer

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

Instance Method Summary collapse

Constructor Details

#initialize(config:, provider:, state_store:, dns_operation: nil, event_bus: Events::NullBus.new, clock: Clock.new) ⇒ DestroyServer

Returns a new instance of DestroyServer.



11
12
13
14
15
16
17
# File 'lib/kitsune/kit/workflows/destroy_server.rb', line 11

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

Instance Method Details

#call(confirmation:) ⇒ Object



19
20
21
# File 'lib/kitsune/kit/workflows/destroy_server.rb', line 19

def call(confirmation:)
  @state_store.with_execution_lock(config.environment) { call_unlocked(confirmation: confirmation) }
end