mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
don't warn about unitted @reason; fix objectspace errors on jruby; make subproject tasks less noisy
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@876 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
parent
0660f36c16
commit
2d38b5d25b
5 changed files with 33 additions and 24 deletions
|
@ -1,4 +1,6 @@
|
|||
|
||||
v1.1.1. Fix mongrel_rails restart bug; fix bug with Rack status codes.
|
||||
|
||||
v1.1. Pure Ruby URIClassifier. More modular architecture. JRuby support. Move C URIClassifier into mongrel_experimental project.
|
||||
|
||||
v1.0.4. Backport fixes for versioning inconsistency, mongrel_rails bug, and DirHandler bug.
|
||||
|
|
6
Rakefile
6
Rakefile
|
@ -120,7 +120,7 @@ def sub_project(project, *targets)
|
|||
targets.each do |target|
|
||||
Dir.chdir "projects/#{project}" do
|
||||
unless RUBY_PLATFORM =~ /mswin/
|
||||
sh %{rake --trace #{target.to_s} }
|
||||
sh("rake #{target.to_s}") # --trace
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -155,7 +155,7 @@ task :install => [:install_requirements] do
|
|||
sub_project("mongrel_upload_progress", :install)
|
||||
sub_project("mongrel_console", :install)
|
||||
sub_project("mongrel_cluster", :install)
|
||||
sub_project("mongrel_experimental", :install)
|
||||
# sub_project("mongrel_experimental", :install)
|
||||
sub_project("mongrel_service", :install) if RUBY_PLATFORM =~ /mswin/
|
||||
end
|
||||
|
||||
|
@ -167,7 +167,7 @@ task :uninstall => [:clean] do
|
|||
sub_project("mongrel_console", :uninstall)
|
||||
sub_project("gem_plugin", :uninstall)
|
||||
sub_project("fastthread", :uninstall)
|
||||
sub_project("mongrel_experimental", :uninstall)
|
||||
# sub_project("mongrel_experimental", :uninstall)
|
||||
sub_project("mongrel_service", :uninstall) if RUBY_PLATFORM =~ /mswin/
|
||||
end
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ require 'stringio'
|
|||
|
||||
require 'mongrel/gems'
|
||||
|
||||
Mongrel::Gems.require 'gem_plugin'
|
||||
Mongrel::Gems.require 'cgi_multipart_eof_fix'
|
||||
Mongrel::Gems.require 'fastthread'
|
||||
require 'thread'
|
||||
|
|
|
@ -122,17 +122,20 @@ module RequestLog
|
|||
begin
|
||||
stats = Hash.new(0)
|
||||
lengths = {}
|
||||
ObjectSpace.each_object do |o|
|
||||
begin
|
||||
if o.respond_to? :length
|
||||
len = o.length
|
||||
lengths[o.class] ||= Mongrel::Stats.new(o.class)
|
||||
lengths[o.class].sample(len)
|
||||
begin
|
||||
ObjectSpace.each_object do |o|
|
||||
begin
|
||||
if o.respond_to? :length
|
||||
len = o.length
|
||||
lengths[o.class] ||= Mongrel::Stats.new(o.class)
|
||||
lengths[o.class].sample(len)
|
||||
end
|
||||
rescue Object
|
||||
end
|
||||
rescue Object
|
||||
|
||||
stats[o.class] += 1
|
||||
end
|
||||
|
||||
stats[o.class] += 1
|
||||
rescue Object # Ignore since ObjectSpace might not be loaded on JRuby
|
||||
end
|
||||
|
||||
stats.sort {|(k1,v1),(k2,v2)| v2 <=> v1}.each do |k,v|
|
||||
|
@ -171,21 +174,23 @@ module RequestLog
|
|||
|
||||
def process(request, response)
|
||||
MongrelDbg::trace(:threads, "#{Time.now} REQUEST #{request.params['PATH_INFO']}")
|
||||
ObjectSpace.each_object do |obj|
|
||||
begin
|
||||
if obj.class == Mongrel::HttpServer
|
||||
worker_list = obj.workers.list
|
||||
|
||||
if worker_list.length > 0
|
||||
keys = "-----\n\tKEYS:"
|
||||
worker_list.each {|t| keys << "\n\t\t-- #{t}: #{t.keys.inspect}" }
|
||||
begin
|
||||
ObjectSpace.each_object do |obj|
|
||||
begin
|
||||
if obj.class == Mongrel::HttpServer
|
||||
worker_list = obj.workers.list
|
||||
|
||||
if worker_list.length > 0
|
||||
keys = "-----\n\tKEYS:"
|
||||
worker_list.each {|t| keys << "\n\t\t-- #{t}: #{t.keys.inspect}" }
|
||||
end
|
||||
|
||||
MongrelDbg::trace(:threads, "#{obj.host}:#{obj.port} -- THREADS: #{worker_list.length} #{keys}")
|
||||
end
|
||||
|
||||
MongrelDbg::trace(:threads, "#{obj.host}:#{obj.port} -- THREADS: #{worker_list.length} #{keys}")
|
||||
rescue Object # Ignore since obj.class can sometimes take parameters
|
||||
end
|
||||
rescue Object
|
||||
# ignore since obj.class can sometimes take parameters
|
||||
end
|
||||
rescue Object # Ignore since ObjectSpace might not be loaded on JRuby
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -43,6 +43,7 @@ module Mongrel
|
|||
@socket = socket
|
||||
@body = StringIO.new
|
||||
@status = 404
|
||||
@reason = nil
|
||||
@header = HeaderOut.new(StringIO.new)
|
||||
@header[Const::DATE] = Time.now.httpdate
|
||||
@body_sent = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue