<commit_before>namespace :migrate do
  namespace :arena do
    namespace :convert do
      task :all do
        [:people,:families,:attributes,:small_groups,:attendance].each do |task|
          Rake::Task["migrate:arena:convert:#{task.to_s}"].invoke
        end
      end

      task :attendance => :environment do
        ArenaOccurrenceAttendance.find_each do |record|
          record.sync_to_rock!
        end
      end
      
      task :people => :environment do
        ArenaPerson.find_each do |arena_person|
          arena_person.sync_to_rock!
        end
      end

      task :families => :environment do
        ArenaFamily.find_each do |arena_family|
          arena_family.sync_to_rock!
        end
      end

      task :attributes => :environment do
        ArenaPersonAttribute.find_each do |attribute|
          attribute.sync_to_rock!
        end
      end
      
      task :small_groups => :environment do<commit_msg>updated arena family location conversion.  Continue when no HOH is found<commit_after>namespace :migrate do
  namespace :arena do
    namespace :convert do
      task :all do
        [:people,:families,:attributes,:small_groups,:attendance].each do |task|
          Rake::Task["migrate:arena:convert:#{task.to_s}"].invoke
        end
      end

      task :attendance => :environment do
        ArenaOccurrenceAttendance.find_each do |record|
          record.sync_to_rock!
        end
      end
      
      task :people => :environment do
        ArenaPerson.find_each do |arena_person|
          arena_person.sync_to_rock!
        end
      end

      task :families => :environment do
        errors = []
        ArenaFamily.find_each do |arena_family|
          begin
            arena_family.sync_to_rock!
          rescue Exception => e
            errors << e.message
          end
        end
        puts errors.join('\n')
      end

      task :attributes => :environment do
        ArenaPersonAttribute.find_each do |attribute|
          attribute.sync_to_rock!
        end
      end
      
      task :small_groups => :environment do
{'fraction_non_alphanumeric': 0.07909875359539789, 'fraction_numerical': 0.0, 'mean_word_length': 2.060117302052786, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1867728', 'n_tokens_mistral': 596, 'n_tokens_neox': 603, 'n_words': 143}