From 8d8c6af0af216e5588d2898606707a200f7c8bbb Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 13 Feb 2020 14:14:38 +0800 Subject: [PATCH] 1 --- lib/tasks/statistic_subject_info.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/statistic_subject_info.rake b/lib/tasks/statistic_subject_info.rake index 3fdc46bc3..27496e719 100644 --- a/lib/tasks/statistic_subject_info.rake +++ b/lib/tasks/statistic_subject_info.rake @@ -24,6 +24,7 @@ namespace :subjects do "'#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}', '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}')") buffer_size += 1 puts "buffer_size: #{buffer_size}; subject_id: #{subject.id}; s: #{s.last}; subject: #{subject == s.last};" + puts "####str: #{str}" if buffer_size == 1000 || subject == s.last sql = "REPLACE INTO subject_records(#{column_value}) VALUES #{str}" puts sql