|
|
@ -47,8 +47,7 @@ namespace :subjects do
|
|
|
|
subjects = subjects.where(id:ENV['subject_id'])
|
|
|
|
subjects = subjects.where(id:ENV['subject_id'])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
subjects.find_in_batches(batch_size: 20) do |s|
|
|
|
|
subjects.find_in_batches(batch_size: 20) do |s|
|
|
|
|
str = []
|
|
|
|
Parallel.each_with_index(s, in_processes: 4) do |subject, index, str = []|
|
|
|
|
Parallel.each(s, in_processes: 6) do |subject|
|
|
|
|
|
|
|
|
puts("---------------------course_info_statistic: #{subject.id}")
|
|
|
|
puts("---------------------course_info_statistic: #{subject.id}")
|
|
|
|
Rails.logger.info("---------------------course_info_statistic: #{subject.id}")
|
|
|
|
Rails.logger.info("---------------------course_info_statistic: #{subject.id}")
|
|
|
|
data = Subjects::CourseUsedInfoService.call(subject)
|
|
|
|
data = Subjects::CourseUsedInfoService.call(subject)
|
|
|
|