<commit_before>namespace :linuxfr do
  desc "Daily crontab"
  task :daily => [
    :flush_poll_ips,
    'sitemap:refresh'
  ]

  desc "New day => the users can revote on polls"
  task :flush_poll_ips => :environment do
    PollIp.delete_all
  end
end<commit_msg>Delete old stuff in the daily crontab<commit_after>namespace :linuxfr do
  desc "Daily crontab"
  task :daily => [
    :flush_poll_ips,
    :delete_old_passive_accounts,
    :delete_old_boards,
    'sitemap:refresh',
    'friendly_id:remove_old_slugs'
  ]

  desc "New day => the users can revote on polls"
  task :flush_poll_ips => :environment do
    PollIp.delete_all
  end

  desc "Delete old accounts that were never activated"
  task :delete_old_passive_accounts => :environment do
    Account.passive.delete_all(["created_at <= ?", DateTime.now - 2.days])
  end

  desc "Delete old messages in the boards"
  task :delete_old_boards => :environment do
    Board.delete_all(["created_at <= ? AND object_type = ?", DateTime.now - 12.hours, Board.free])
    Board.delete_all(["created_at <= ?", DateTime.now - 1.month])
  end
end
{'fraction_non_alphanumeric': 0.10694698354661791, 'fraction_numerical': 0.003656307129798903, 'mean_word_length': 3.888392857142857, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 11, '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': '6236937', 'n_tokens_mistral': 383, 'n_tokens_neox': 367, 'n_words': 97}