Mercurial > hg > soundsoftware-site
view extra/soundsoftware/get-statistics.rb @ 1459:cf78a7ade302 luisf
Merge from branch "bug_794"
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Mon, 11 Nov 2013 18:25:50 +0000 |
parents | 02a05da0bedc |
children |
line wrap: on
line source
# Log user and project information # # Invoke with e.g. # # ./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, :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} stats = {:date => Date.today, :projects => projectStats, :users => userStats}.to_json print "#{stats}\n"