diff --git a/lib/tasks/site.rake b/lib/tasks/site.rake index a2fb75deb..6cd17fa93 100644 --- a/lib/tasks/site.rake +++ b/lib/tasks/site.rake @@ -25,12 +25,11 @@ namespace :site do task :necessary_data => :environment do auto_setting site = Site.first - site.title = 'RulingOrbit Demo Site' - site.resque_namespace = @resque_namespace + site.update_attribute(:title,'RulingOrbit Demo Site') + site.update_attribute(:resque_namespace,@resque_namespace) # home_trans = I18nVariable.create!( :document_class => 'Home', :key => 'home', :en => 'Homepage', :zh_tw => '首頁') design = Design.first - site = Site.first site.design = design site.save theme = design.themes.first @@ -51,6 +50,7 @@ namespace :site do @resque_namespace = STDIN.gets.gsub("\n",'') @resque_namespace = APP_CONFIG['orbit'] if @resque_namespace.empty? + puts "Is this the only site [ Entry site? ] on this mechine?[Default No]:......" site_is_alone = false site_is_alone = STDIN.gets.gsub("\n",'') @@ -69,12 +69,12 @@ namespace :site do @traffic_rate = traffic_heavy ? 2 : 1 if site_is_alone - @resque_workers = 5 * traffic_rate #Entry Site + @resque_workers = 5 * @traffic_rate #Entry Site else if site_is_primary - @resque_workers = 2 * traffic_rate #Primary Site + @resque_workers = 2 * @traffic_rate #Primary Site else - @resque_workers = 1 * traffic_rate #Secondary Site + @resque_workers = 1 * @traffic_rate #Secondary Site end end