高校数据迁移

video_transcode
daiao 5 years ago
parent edb4aedf07
commit 3adb381fe7

@ -4,7 +4,7 @@ namespace :static_all do
task :repo => :environment do
school_alls = School.includes(:courses, user_extensions: :user).all
school_alls.find_in_batches(batch_size: 50) do |schools|
Parallel.each_with_index(schools, in_processes: 5) do |school, index|
Parallel.each(schools, in_processes: 5) do |school|
puts("school_id: #{school.id}")
data = Schools::SchoolStatisticService.new(school)
sta_all = StaAll.find_or_initialize_by(school_id: school.id)

Loading…
Cancel
Save