Class: KillNodeRunners

Inherits:
Object
  • Object
show all
Defined in:
app/services/kill_node_runners.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node:) ⇒ KillNodeRunners

Returns a new instance of KillNodeRunners.



6
7
8
# File 'app/services/kill_node_runners.rb', line 6

def initialize(node:)
  @node = node
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



4
5
6
# File 'app/services/kill_node_runners.rb', line 4

def node
  @node
end

Instance Method Details

#performObject



10
11
12
13
14
15
16
# File 'app/services/kill_node_runners.rb', line 10

def perform
  node.slots.running.each do |slot|
    node
      .runner_service(:kill_slot_runner)
      .perform(slot: slot)
  end
end