aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-05-02 22:18:20 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-05-02 22:18:20 +0000
commitd1d8657ea6bfce2f5442608ed0fd0dfcf53f6f6f (patch)
tree9825f5401e05ce6de426a1fbd6c1f4691cb6f2ab
parent0bc2485eac73ea06e788d4fffe8891af2e8c4704 (diff)
downloadrails-d1d8657ea6bfce2f5442608ed0fd0dfcf53f6f6f.tar.gz
rails-d1d8657ea6bfce2f5442608ed0fd0dfcf53f6f6f.tar.bz2
rails-d1d8657ea6bfce2f5442608ed0fd0dfcf53f6f6f.zip
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
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/commands/process/spawner.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 0d1d84a61b..1dd37f326d 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -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.]
diff --git a/railties/lib/commands/process/spawner.rb b/railties/lib/commands/process/spawner.rb
index 9424dacc74..b730a695ea 100644
--- a/railties/lib/commands/process/spawner.rb
+++ b/railties/lib/commands/process/spawner.rb
@@ -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) }