|
|
|
@ -11,7 +11,8 @@ namespace :subjects do
|
|
|
|
|
str = []
|
|
|
|
|
puts("Parallel.worker_number: #{Parallel.worker_number}")
|
|
|
|
|
subjects.find_in_batches(start: (Parallel.worker_number/4) * subjects.count,
|
|
|
|
|
finish: ((Parallel.worker_number+1)/4) * subjects.count) do |subject|
|
|
|
|
|
finish: ((Parallel.worker_number+1)/4) * subjects.count) do |s|
|
|
|
|
|
s.each do |subject|
|
|
|
|
|
puts("---------------------data_statistic: #{subject.id}")
|
|
|
|
|
Rails.logger.info("---------------------data_statistic: #{subject.id}")
|
|
|
|
|
data = Subjects::DataStatisticService.new(subject)
|
|
|
|
@ -31,6 +32,7 @@ namespace :subjects do
|
|
|
|
|
str = []
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|