Skip to content

Commit

Permalink
Added user count to show progress throughout the survey migration task
Browse files Browse the repository at this point in the history
  • Loading branch information
remomueller committed Dec 16, 2014
1 parent ce8de0a commit ba399c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/tasks/surveys.rake
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ namespace :surveys do

desc "Update links"
task :migrate_old_survey => :environment do
User.order("created_at asc").each do |user|
puts "Migrating user #{user.email}"
user_count = User.count
User.order("created_at asc").each_with_index do |user, index|
puts "Migrating user (#{index+1} of #{user_count}) #{user.email}"
old_answer_session = user.answer_sessions.where(question_flow_id: 13).first

if old_answer_session
Expand Down

0 comments on commit ba399c7

Please sign in to comment.