mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 07:28:41 -07:00
Load a single year of student demographic data and race scores at a time
This commit is contained in:
parent
4a32ea3332
commit
3f493727b3
3 changed files with 31 additions and 16 deletions
|
|
@ -71,7 +71,7 @@ namespace :one_off do
|
|||
|
||||
desc 'load students'
|
||||
task load_students: :environment do
|
||||
Dir.glob(Rails.root.join('data', 'survey_responses', '2019-20_*student*.csv')).each do |file|
|
||||
Dir.glob(Rails.root.join('data', 'survey_responses', '2021-22_*student*.csv')).each do |file|
|
||||
puts "=====================> Loading student data from csv at path: #{file}"
|
||||
StudentLoader.load_data filepath: file
|
||||
end
|
||||
|
|
@ -119,7 +119,8 @@ namespace :one_off do
|
|||
desc 'reset race score calculations'
|
||||
task reset_race_scores: :environment do
|
||||
puts 'Resetting race scores'
|
||||
RaceScoreLoader.reset(schools: [School.find_by_slug('a-irvin-studley-elementary-school')])
|
||||
academic_years = [AcademicYear.find_by_range('2021-22')]
|
||||
RaceScoreLoader.reset(academic_years:)
|
||||
Rails.cache.clear
|
||||
puts "=====================> Completed loading #{RaceScore.count} race scores"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue