rake打印结果

video_transcode
jingquan huang 5 years ago
parent d56508d264
commit 78ed9a04e5

@ -3,6 +3,7 @@ desc "同步学院或者单位评测数"
namespace :sync_evaluate do
task outpus_count: :environment do
School.find_each do |school|
puts school.id
evaluate_count = Game.find_by_sql("select sum(g.evaluate_count) as e_count from games g, user_extensions ue where
g.user_id = ue.user_id and ue.school_id = #{school}.id").firt.try(:e_count)

Loading…
Cancel
Save