Class: KillTaskContainer
- Inherits:
-
Object
- Object
- KillTaskContainer
- Defined in:
- app/services/kill_task_container.rb
Defined Under Namespace
Classes: TaskNotRunningError
Instance Attribute Summary collapse
-
#task ⇒ Object
readonly
Returns the value of attribute task.
Instance Method Summary collapse
-
#initialize(task:) ⇒ KillTaskContainer
constructor
A new instance of KillTaskContainer.
- #perform ⇒ Object
Constructor Details
#initialize(task:) ⇒ KillTaskContainer
Returns a new instance of KillTaskContainer.
10 11 12 |
# File 'app/services/kill_task_container.rb', line 10 def initialize(task:) @task = task end |
Instance Attribute Details
#task ⇒ Object (readonly)
Returns the value of attribute task.
4 5 6 |
# File 'app/services/kill_task_container.rb', line 4 def task @task end |
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/services/kill_task_container.rb', line 14 def perform validate_task_status task .slot .node .runner_service(:kill_slot_runner) .perform(slot: task.slot) end |