Added an EXPERIMENTAL gateway.cgi for getting high-speed performance through...

Added an EXPERIMENTAL gateway.cgi for getting high-speed performance through vanilla CGI using a long-running, DRb-backed server in the background (using script/listener and script/tracker) #1603 [Nicholas Seckar]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1674 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 5dedf62d
*SVN*
* Added an EXPERIMENTAL gateway.cgi for getting high-speed performance through vanilla CGI using a long-running, DRb-backed server in the background (using script/listener and script/tracker) #1603 [Nicholas Seckar]
* Added migration generator: ./script/generate migration add_system_settings
* Added "migrate" as rake task to execute all the pending migrations from db/migrate
......
......@@ -26,7 +26,7 @@ TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/test )
LOG_FILES = %w( server.log development.log test.log production.log )
HTML_FILES = %w( 404.html 500.html index.html favicon.ico javascripts/prototype.js javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js )
BIN_FILES = %w( generate destroy breakpointer console server update runner profiler benchmarker )
BIN_FILES = %w( generate destroy breakpointer console server update runner profiler benchmarker listener tracker )
VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport actionwebservice railties )
......@@ -135,6 +135,9 @@ task :copy_dispatches do
copy_with_rewritten_ruby_path("dispatches/dispatch.fcgi", "#{PKG_DESTINATION}/public/dispatch.fcgi")
chmod 0755, "#{PKG_DESTINATION}/public/dispatch.fcgi"
copy_with_rewritten_ruby_path("dispatches/gateway.cgi", "#{PKG_DESTINATION}/public/gateway.cgi")
chmod 0644, "#{PKG_DESTINATION}/public/gateway.cgi"
end
task :copy_html_files do
......
......@@ -45,14 +45,14 @@ def initialize(log_file_path = nil, gc_request_period = nil)
dispatcher_log(:info, "starting")
end
def process!
def process!(provider = FCGI)
# Make a note of $" so we can safely reload this instance.
mark!
# Begin countdown to garbage collection.
run_gc! if gc_request_period
FCGI.each_cgi do |cgi|
provider.each_cgi do |cgi|
# Safely reload this instance if requested.
if when_ready == :reload
run_gc! if gc_request_period
......@@ -90,7 +90,8 @@ def process!
dispatcher_error(fcgi_error, "killed by this error")
end
end
private
def logger
@logger ||= Logger.new(@log_file_path)
......
......@@ -43,7 +43,7 @@ def manifest
m.file "environments/test.rb", "config/environments/test.rb"
# Scripts
%w(console destroy generate server runner benchmarker profiler).each do |file|
%w(console destroy generate server runner benchmarker profiler tracker listener).each do |file|
m.file "bin/#{file}", "script/#{file}", script_options
end
if options[:gem]
......@@ -56,6 +56,7 @@ def manifest
m.file "dispatches/dispatch.rb", "public/dispatch.rb", script_options
m.file "dispatches/dispatch.rb", "public/dispatch.cgi", script_options
m.file "dispatches/dispatch.fcgi", "public/dispatch.fcgi", script_options
m.file "dispatches/gateway.cgi", "public/gateway.cgi", script_options
# HTML files
%w(404 500 index).each do |file|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册