From bb5cfce09fb13fae8f6f7be0f1d3147212f3068b Mon Sep 17 00:00:00 2001 From: rebuilt Date: Fri, 16 Jun 2023 13:57:02 -0700 Subject: [PATCH] Remove precalculation of response rates. Add loading of student info to database --- lib/tasks/data.rake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/tasks/data.rake b/lib/tasks/data.rake index 0d060c24..7378fb4d 100644 --- a/lib/tasks/data.rake +++ b/lib/tasks/data.rake @@ -11,9 +11,10 @@ namespace :data do end puts "=====================> Completed loading #{SurveyItemResponse.count} survey responses" - puts 'Resetting response rates' - ResponseRateLoader.reset - puts "=====================> Completed loading #{ResponseRate.count} survey responses" + Sftp::Directory.open(path:) do |file| + StudentLoader.from_file(file:, rules: [Rule::SkipNonLowellSchools]) + end + puts "=====================> Completed loading #{Student.count - student_count} students. #{Student.count} total students" puts 'Resetting race scores' RaceScoreLoader.reset(fast_processing: false)