<commit_before>require 'active_record/fixtures'
require 'tasks/message_template'

namespace :enju_message do
  desc "create initial records for enju_message"
  task :setup => :environment do
    Dir.glob(Rails.root.to_s + '/db/fixtures/enju_message/*.yml').each do |file|
      ActiveRecord::FixtureSet.create_fixtures('db/fixtures/enju_message', File.basename(file, '.*'))
    end
  end

  desc "Send messages"
  task :send => :environment do
    MessageRequest.send_messages if defined?(EnjuMessage)
  end

  desc "upgrade enju_message"
  task :upgrade => :environment do
    MessageTemplate.transaction do
      update_message_template
    end
    puts 'enju_message: The upgrade completed successfully.'
  end
end<commit_msg>update upgrade task<commit_after>require 'active_record/fixtures'
require 'tasks/message_template'

namespace :enju_message do
  desc "create initial records for enju_message"
  task :setup => :environment do
    Dir.glob(Rails.root.to_s + '/db/fixtures/enju_message/*.yml').each do |file|
      ActiveRecord::FixtureSet.create_fixtures('db/fixtures/enju_message', File.basename(file, '.*'))
    end
  end

  desc "Send messages"
  task :send => :environment do
    MessageRequest.send_messages if defined?(EnjuMessage)
  end

  desc "upgrade enju_message"
  task :upgrade => :environment do
    Rake::Task['statesman:backfill_most_recent'].invoke('Message')
    Rake::Task['statesman:backfill_most_recent'].invoke('MessageRequest')
    puts 'enju_message: The upgrade completed successfully.'
  end
end
{'fraction_non_alphanumeric': 0.10900783289817233, 'fraction_numerical': 0.0, 'mean_word_length': 4.7631578947368425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1059288', 'n_tokens_mistral': 481, 'n_tokens_neox': 472, 'n_words': 109}