diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-05-02 22:18:20 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-05-02 22:18:20 +0000 |
commit | d1d8657ea6bfce2f5442608ed0fd0dfcf53f6f6f (patch) | |
tree | 9825f5401e05ce6de426a1fbd6c1f4691cb6f2ab /railties/lib/commands/process | |
parent | 0bc2485eac73ea06e788d4fffe8891af2e8c4704 (diff) | |
download | rails-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
Diffstat (limited to 'railties/lib/commands/process')
-rw-r--r-- | railties/lib/commands/process/spawner.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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) } |