实践课堂

Adjustreact
daiao 5 years ago
parent e0d05df0f4
commit dc87803e5a

@ -23,7 +23,7 @@ namespace :subjects do
"#{data.passed_count}, #{data.course_used_count}, #{data.school_used_count}, " +
"'#{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: #{subject == s.last}; index:#{index+1}"
puts "buffer_size: #{buffer_size}; s_id: #{s.id}; subject_id: #{subject.id}; subject: #{subject == s.last}; index:#{index+1}"
if buffer_size == 1000 || subject == s.last
sql = "REPLACE INTO subject_records(#{column_value}) VALUES #{str}"
puts sql

Loading…
Cancel
Save