From 3adb381fe7d7cc62815f74418d35ec338dbcd23f Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 6 Mar 2020 16:04:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E6=A0=A1=E6=95=B0=E6=8D=AE=E8=BF=81?= =?UTF-8?q?=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/static_all.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/static_all.rake b/lib/tasks/static_all.rake index 01ecffcff..6deec5da1 100644 --- a/lib/tasks/static_all.rake +++ b/lib/tasks/static_all.rake @@ -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)