Mercurial > hg > soundsoftware-site
changeset 1454:02a05da0bedc luisf
Extracting also top-level project stats in script.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 07 Nov 2013 17:09:55 +0000 |
parents | b554eb79ec7b |
children | 5e0957fe308d |
files | extra/soundsoftware/get-statistics.rb |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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}