|
|
|
@ -2,7 +2,7 @@ desc "同步学院或者单位评测数"
|
|
|
|
|
|
|
|
|
|
namespace :sync_evaluate do
|
|
|
|
|
task outpus_count: :environment do
|
|
|
|
|
School.find_in_batches(batch_size: 500) do |school|
|
|
|
|
|
School.find_each do |school|
|
|
|
|
|
Parallel.each_with_index(school, in_processes: 5) do |s|
|
|
|
|
|
puts "school_id:#{s.id}"
|
|
|
|
|
evaluate_count = Game.find_by_sql("select sum(g.evaluate_count) as e_count from games g, user_extensions ue where
|
|
|
|
|