Class: FireAndForget::Command::Kill

Inherits:
CommandBase show all
Defined in:
lib/fire_and_forget/command/kill.rb

Instance Attribute Summary

Attributes inherited from CommandBase

#cmd, #params, #tag, #task

Instance Method Summary collapse

Methods inherited from CommandBase

#debug, #dump, #merge_params

Constructor Details

#initialize(task_name, signal = "TERM") ⇒ Kill

Returns a new instance of Kill.



5
6
7
# File 'lib/fire_and_forget/command/kill.rb', line 5

def initialize(task_name, signal="TERM")
  @task_name, @signal = task_name.to_sym, signal
end

Instance Method Details

#runObject



9
10
11
# File 'lib/fire_and_forget/command/kill.rb', line 9

def run
  FireAndForget::Server.kill(@task_name, @signal)
end