# HG changeset patch # User luisf # Date 1383844195 0 # Node ID 02a05da0bedc49167b2f039ae420a4ac45dbca3d # Parent b554eb79ec7b0805e6a4d797410abbdce6db0b1b Extracting also top-level project stats in script. diff -r b554eb79ec7b -r 02a05da0bedc extra/soundsoftware/get-statistics.rb --- a/extra/soundsoftware/get-statistics.rb Thu Nov 07 17:03:33 2013 +0000 +++ b/extra/soundsoftware/get-statistics.rb Thu Nov 07 17:09:55 2013 +0000 @@ -6,7 +6,12 @@ # ./script/rails runner -e production extra/soundsoftware/get-statistics.rb # -projectStats = {:all => Project.active.all.count, :private => Project.active.find(:all, :conditions => {:is_public => false}).count} +projectStats = { + :all => Project.active.all.count, + :private => Project.active.find(:all, :conditions => {:is_public => false}).count, + :top_level => Project.active.find(:all, :conditions => {:parent_id => nil}).count, + :top_level_and_private => Project.active.find(:all, :conditions => {:is_public => false, :parent_id => nil}).count + } userStats = {:all => User.active.all.count}