1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

cluster.rb - remove worker dead (#1927)

This commit is contained in:
MSP-Greg 2019-08-24 02:08:27 -05:00 committed by Nate Berkopec
parent 9fb12283db
commit 1046165a9c

View file

@ -74,7 +74,6 @@ module Puma
@started_at = Time.now @started_at = Time.now
@last_checkin = Time.now @last_checkin = Time.now
@last_status = '{}' @last_status = '{}'
@dead = false
@term = false @term = false
end end
@ -89,14 +88,6 @@ module Puma
@stage = :booted @stage = :booted
end end
def dead?
@dead
end
def dead!
@dead = true
end
def term? def term?
@term @term
end end
@ -507,7 +498,7 @@ module Puma
log "- Worker #{w.index} (pid: #{pid}) booted, phase: #{w.phase}" log "- Worker #{w.index} (pid: #{pid}) booted, phase: #{w.phase}"
force_check = true force_check = true
when "t" when "t"
w.dead! w.term
force_check = true force_check = true
when "p" when "p"
w.ping!(result.sub(/^\d+/,'').chomp) w.ping!(result.sub(/^\d+/,'').chomp)