Parent

Files

Puma::Cluster::Worker

Attributes

phase[R]
pid[R]
signal[R]

Public Class Methods

new(pid, phase) click to toggle source
# File lib/puma/cluster.rb, line 32
def initialize(pid, phase)
  @pid = pid
  @phase = phase
  @stage = :started
  @signal = "TERM"
end

Public Instance Methods

boot!() click to toggle source
# File lib/puma/cluster.rb, line 45
def boot!
  @stage = :booted
end
booted?() click to toggle source
# File lib/puma/cluster.rb, line 41
def booted?
  @stage == :booted
end
term() click to toggle source
# File lib/puma/cluster.rb, line 49
def term
  begin
    if @first_term_sent && (Time.new - @first_term_sent) > 30
      @signal = "KILL"
    else
      @first_term_sent ||= Time.new
    end

    Process.kill @signal, @pid
  rescue Errno::ESRCH
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.