Class: Ap4r::Mongrel::Ap4rConfigurator
- Inherits:
-
Mongrel::Configurator
- Object
- Mongrel::Configurator
- Ap4r::Mongrel::Ap4rConfigurator
- Defined in:
- lib/ap4r/mongrel.rb
Overview
Gather controls AP4R server.
Instance Method Summary collapse
- #mswin? ⇒ Boolean
- #pid_from_file ⇒ Object
- #remove_pid_file ⇒ Object
- #stop(needs_restart = false) ⇒ Object
Instance Method Details
#mswin? ⇒ Boolean
25 26 27 |
# File 'lib/ap4r/mongrel.rb', line 25 def mswin? RUBY_PLATFORM =~ /mswin/ end |
#pid_from_file ⇒ Object
35 36 37 38 39 |
# File 'lib/ap4r/mongrel.rb', line 35 def pid_from_file File.open(@pid_file) do |file| file.read.to_i end end |
#remove_pid_file ⇒ Object
29 30 31 32 33 |
# File 'lib/ap4r/mongrel.rb', line 29 def remove_pid_file return unless @pid_file && File.exists?(@pid_file) # TODO: slit exists between pid check and delete 2007/04/16 by shino File.delete(@pid_file) if pid_from_file == Process.pid end |
#stop(needs_restart = false) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/ap4r/mongrel.rb', line 17 def stop(needs_restart=false) ::ReliableMsg::Client.new.instance_eval do qm.stop end super join end |