let site builder can enter rescue's worker
This commit is contained in:
parent
371485e420
commit
452bddb587
|
@ -28,6 +28,13 @@ namespace :site do
|
||||||
site_is_primary = STDIN.gets.gsub("\n",'')
|
site_is_primary = STDIN.gets.gsub("\n",'')
|
||||||
site_is_primary = true if site_is_primary.downcase == 'yes'
|
site_is_primary = true if site_is_primary.downcase == 'yes'
|
||||||
|
|
||||||
|
puts "Is this the only site on this mechine?[Default No]:......"
|
||||||
|
site_is_alone = false
|
||||||
|
site_is_alone = STDIN.gets.gsub("\n",'')
|
||||||
|
site_is_alone = true if site_is_alone.downcase == 'yes'
|
||||||
|
|
||||||
|
@resque_workers = site_is_alone ? 5 : 2
|
||||||
|
|
||||||
resque_setting = ERB.new(File.new("lib/template/setting/resque.god.erb").read)
|
resque_setting = ERB.new(File.new("lib/template/setting/resque.god.erb").read)
|
||||||
File.open("config/resque.god", 'w') { |file| file.write(resque_setting.result) }
|
File.open("config/resque.god", 'w') { |file| file.write(resque_setting.result) }
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ user_home = ENV['HOME'] || File.dirname(__FILE__) + '/../..'
|
||||||
development_uid = ''
|
development_uid = ''
|
||||||
development_gid = ''
|
development_gid = ''
|
||||||
|
|
||||||
num_workers = rails_env == 'production' ? 5 : 2
|
num_workers = rails_env == 'production' ? <%= @resque_workers %> : 2
|
||||||
|
|
||||||
num_workers.times do |num|
|
num_workers.times do |num|
|
||||||
God.watch do |w|
|
God.watch do |w|
|
||||||
|
|
Loading…
Reference in New Issue