mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Merge branch 'pid-control-thread' of git://github.com/MSP-Greg/puma into MSP-Greg-pid-control-thread
This commit is contained in:
commit
7188ec8571
2 changed files with 8 additions and 7 deletions
|
@ -59,7 +59,7 @@ module Puma
|
|||
|
||||
control.binder.parse [str], self, 'Starting control server'
|
||||
|
||||
control.run
|
||||
control.run thread_name: 'control'
|
||||
@control = control
|
||||
end
|
||||
|
||||
|
@ -85,10 +85,11 @@ module Puma
|
|||
min_t = @options[:min_threads]
|
||||
max_t = @options[:max_threads]
|
||||
|
||||
log "Puma starting in #{mode} mode..."
|
||||
log "* Version #{Puma::Const::PUMA_VERSION} (#{ruby_engine}), codename: #{Puma::Const::CODE_NAME}"
|
||||
log "* Min threads: #{min_t}, max threads: #{max_t}"
|
||||
log "* Environment: #{ENV['RACK_ENV']}"
|
||||
log "Puma starting in #{mode} mode...\n" \
|
||||
"* Version #{Puma::Const::PUMA_VERSION} (#{ruby_engine}), codename: #{Puma::Const::CODE_NAME}\n" \
|
||||
"* Min threads: #{min_t}, max threads: #{max_t}\n" \
|
||||
"* Environment: #{ENV['RACK_ENV']}\n" \
|
||||
"* Pid: #{Process.pid}"
|
||||
end
|
||||
|
||||
def redirected_io?
|
||||
|
|
|
@ -219,7 +219,7 @@ module Puma
|
|||
# up in the background to handle requests. Otherwise requests
|
||||
# are handled synchronously.
|
||||
#
|
||||
def run(background=true)
|
||||
def run(background=true, thread_name: 'server')
|
||||
BasicSocket.do_not_reverse_lookup = true
|
||||
|
||||
@events.fire :state, :booting
|
||||
|
@ -255,7 +255,7 @@ module Puma
|
|||
|
||||
if background
|
||||
@thread = Thread.new do
|
||||
Puma.set_thread_name "server"
|
||||
Puma.set_thread_name thread_name
|
||||
handle_servers
|
||||
end
|
||||
return @thread
|
||||
|
|
Loading…
Add table
Reference in a new issue