diff --git a/lib/tasks/data.rake b/lib/tasks/data.rake index 2b2ea8ed..23a355b8 100644 --- a/lib/tasks/data.rake +++ b/lib/tasks/data.rake @@ -1,7 +1,7 @@ # PSQL: /Applications/Postgres.app/Contents/Versions/9.6/bin/psql -h localhost # LOAD DATA -# RAILS_ENV=development rails db:environment:set db:drop db:create db:migrate; /Applications/Postgres.app/Contents/Versions/9.6/bin/pg_restore --verbose --clean --no-acl --no-owner -h localhost -d mciea_development latest.dump; rake db:migrate; +# RAILS_ENV=development rails db:environment:set db:drop db:create db:migrate; /Applications/Postgres.app/Contents/Versions/9.6/bin/pg_restore --verbose --clean --no-acl --no-owner -h localhost -d mciea_development beta-data-071819.dump; rake db:migrate; # rails c -> SchoolCategory.update_all(year: '2017') # rake data:load_questions_csv; rake data:load_responses @@ -310,7 +310,6 @@ namespace :data do t = Time.new csv.each_with_index do |row, index| next if index < startIndex - break if index > 100 if Time.new - startTime >= timeToRun || index > stopIndex puts("ENDING #{timeToRun} SECONDS: #{Time.new - startTime} = #{startIndex} -> #{index} = #{index - startIndex} or #{(Time.new - t) / (index - startIndex)} per second")