From 126bd5429aff1e120737c9815e453d74e2d291c3 Mon Sep 17 00:00:00 2001 From: Jared Cosulich Date: Tue, 23 Jul 2019 20:59:27 -0400 Subject: [PATCH] load all data --- lib/tasks/data.rake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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")