mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
trying to get data to load on heroku
This commit is contained in:
parent
4d4b7ed686
commit
2e313b50ed
1 changed files with 5 additions and 5 deletions
|
|
@ -158,15 +158,15 @@ namespace :data do
|
||||||
|
|
||||||
t = Time.new
|
t = Time.new
|
||||||
csv.each_with_index do |row, index|
|
csv.each_with_index do |row, index|
|
||||||
next if index < startIndex
|
# next if index < startIndex
|
||||||
|
#
|
||||||
# if Time.new - startTime >= timeToRun
|
# if Time.new - startTime >= timeToRun
|
||||||
# puts("ENDING #{timeToRun} SECONDS: #{Time.new - startTime} = #{startIndex} -> #{index} = #{index - startIndex} or #{(Time.new - t) / (index - startIndex)} per second")
|
# puts("ENDING #{timeToRun} SECONDS: #{Time.new - startTime} = #{startIndex} -> #{index} = #{index - startIndex} or #{(Time.new - t) / (index - startIndex)} per second")
|
||||||
# break
|
# break
|
||||||
# end
|
# end
|
||||||
|
|
||||||
if index % 100 == 0
|
if index % 100 == 0
|
||||||
puts("PROCESSING ROW: #{index} OUT OF #{csv.length} ROWS: #{Time.new - t} - Total: #{Time.new - startTime} - #{timeToRun - (Time.new - startTime)} TO GO")
|
puts("DATAMSG: PROCESSING ROW: #{index} OUT OF #{csv.length} ROWS: #{Time.new - t} - Total: #{Time.new - startTime} - #{timeToRun - (Time.new - startTime)} TO GO")
|
||||||
t = Time.new
|
t = Time.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -185,7 +185,7 @@ namespace :data do
|
||||||
|
|
||||||
if school.nil?
|
if school.nil?
|
||||||
next if unknown_schools[school_name]
|
next if unknown_schools[school_name]
|
||||||
puts "Unable to find school: #{school_name} - #{index}"
|
puts "DATAMSG: Unable to find school: #{school_name} - #{index}"
|
||||||
unknown_schools[school_name] = true
|
unknown_schools[school_name] = true
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
@ -200,7 +200,7 @@ namespace :data do
|
||||||
name: "Survey Respondent Id: #{respondent_id}"
|
name: "Survey Respondent Id: #{respondent_id}"
|
||||||
)
|
)
|
||||||
rescue
|
rescue
|
||||||
puts "ERROR AT #{index} - #{district.name} - #{school_name} #{school}: #{respondent_id}"
|
puts "DATAMSG: ERROR AT #{index} - #{district.name} - #{school_name} #{school}: #{respondent_id}"
|
||||||
end
|
end
|
||||||
respondent_map[respondent_id] = recipient.id
|
respondent_map[respondent_id] = recipient.id
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue