class FireAndForget::Command::SetPid

Attributes

pid[R]
task_name[R]

Public Class Methods

new(task_name, pid) click to toggle source
# File lib/fire_and_forget/command/set_pid.rb, line 7
def initialize(task_name, pid)
  @task_name, @pid = task_name.to_sym, pid.to_i
end

Public Instance Methods

debug() click to toggle source
# File lib/fire_and_forget/command/set_pid.rb, line 15
def debug
  "SetPid :#{@task_name}: #{@pid}\n"
end
run() click to toggle source
# File lib/fire_and_forget/command/set_pid.rb, line 11
def run
  FireAndForget::Server.pids[@task_name] = @pid
end