<commit_before>namespace :cleanup do

  desc 'Clean up all message redelivery and destroy actions from the holding pen to make admin actions there faster'
  task :holding_pen => :environment do
    dryrun = ENV['DRYRUN'] != '0' if ENV['DRYRUN']
    if dryrun
      $stderr.puts "This is a dryrun - nothing will be deleted"
    end
    holding_pen = InfoRequest.find_by_url_title('holding_pen')
    old_events = holding_pen.info_request_events.find_each(:conditions => ['event_type in (?)',
                                                      ['redeliver_incoming',
                                                      'destroy_incoming']]) do |event|
      puts event.inspect
      if ! dryrun
        event.destroy
      end
    end
  end

end<commit_msg>Change ! to not for better readability<commit_after>namespace :cleanup do

  desc 'Clean up all message redelivery and destroy actions from the holding pen to make admin actions there faster'
  task :holding_pen => :environment do
    dryrun = ENV['DRYRUN'] != '0' if ENV['DRYRUN']
    if dryrun
      $stderr.puts "This is a dryrun - nothing will be deleted"
    end
    holding_pen = InfoRequest.find_by_url_title('holding_pen')
    old_events = holding_pen.info_request_events.find_each(:conditions => ['event_type in (?)',
                                                      ['redeliver_incoming',
                                                      'destroy_incoming']]) do |event|
      puts event.inspect
      if not dryrun
        event.destroy
      end
    end
  end

end
{'fraction_non_alphanumeric': 0.08025889967637541, 'fraction_numerical': 0.0012944983818770227, 'mean_word_length': 2.0613861386138614, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1167060', 'n_tokens_mistral': 416, 'n_tokens_neox': 411, 'n_words': 129}