Class: Puma::CLI::Worker
- Inherits:
-
Object
- Object
- Puma::CLI::Worker
- Defined in:
- lib/puma/cli.rb
Instance Attribute Summary collapse
-
#phase ⇒ Object
readonly
Returns the value of attribute phase.
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
Instance Method Summary collapse
- #boot! ⇒ Object
- #booted? ⇒ Boolean
-
#initialize(pid, phase) ⇒ Worker
constructor
A new instance of Worker.
- #term ⇒ Object
Constructor Details
#initialize(pid, phase) ⇒ Worker
Returns a new instance of Worker.
587 588 589 590 591 |
# File 'lib/puma/cli.rb', line 587 def initialize(pid, phase) @pid = pid @phase = phase @stage = :started end |
Instance Attribute Details
#phase ⇒ Object (readonly)
Returns the value of attribute phase.
593 594 595 |
# File 'lib/puma/cli.rb', line 593 def phase @phase end |
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
593 594 595 |
# File 'lib/puma/cli.rb', line 593 def pid @pid end |
Instance Method Details
#boot! ⇒ Object
599 600 601 |
# File 'lib/puma/cli.rb', line 599 def boot! @stage = :booted end |
#booted? ⇒ Boolean
595 596 597 |
# File 'lib/puma/cli.rb', line 595 def booted? @stage == :booted end |
#term ⇒ Object
603 604 605 606 607 608 |
# File 'lib/puma/cli.rb', line 603 def term begin Process.kill "TERM", @pid rescue Errno::ESRCH end end |