diff --git a/lib/tasks/sync_evaluate.rake b/lib/tasks/sync_evaluate.rake index c0f43c66b..f6f6e9482 100644 --- a/lib/tasks/sync_evaluate.rake +++ b/lib/tasks/sync_evaluate.rake @@ -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)