Added -n/--process to script/process/spawner name the process pid (default is dispatch) [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4322 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson
2006-05-02 22:18:20 +00:00
parent 0bc2485eac
commit d1d8657ea6
2 changed files with 5 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
*SVN*
* Added -n/--process to script/process/spawner name the process pid (default is dispatch) [DHH]
* Namespaced OrderedHash so the Rails implementation does not clash with any others. (fixes #4911) [Julian Tarkhanov]
* Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.]

View File

@@ -43,7 +43,7 @@ end
class FcgiSpawner < Spawner
def self.spawn(port)
system("#{OPTIONS[:spawner]} -f #{OPTIONS[:dispatcher]} -p #{port} -P #{OPTIONS[:pids]}/dispatch.#{port}.pid")
system("#{OPTIONS[:spawner]} -f #{OPTIONS[:dispatcher]} -p #{port} -P #{OPTIONS[:pids]}/#{OPTIONS[:process]}.#{port}.pid")
end
end
@@ -59,6 +59,7 @@ OPTIONS = {
:spawner => '/usr/bin/env spawn-fcgi',
:dispatcher => File.expand_path(RAILS_ROOT + '/public/dispatch.fcgi'),
:pids => File.expand_path(RAILS_ROOT + "/tmp/pids"),
:process => "dispatch",
:port => 8000,
:instances => 3,
:repeat => nil
@@ -94,6 +95,7 @@ ARGV.options do |opts|
opts.on("-i", "--instances=number", Integer, "Number of instances (default: #{OPTIONS[:instances]})") { |OPTIONS[:instances]| }
opts.on("-r", "--repeat=seconds", Integer, "Repeat spawn attempts every n seconds (default: off)") { |OPTIONS[:repeat]| }
opts.on("-e", "--environment=name", String, "test|development|production (default: #{OPTIONS[:environment]})") { |OPTIONS[:environment]| }
opts.on("-n", "--process=name", String, "default: #{OPTIONS[:process]})") { |OPTIONS[:process]| }
opts.on("-s", "--spawner=path", String, "default: #{OPTIONS[:spawner]}") { |OPTIONS[:spawner]| }
opts.on("-d", "--dispatcher=path", String, "default: #{OPTIONS[:dispatcher]}") { |dispatcher| OPTIONS[:dispatcher] = File.expand_path(dispatcher) }