<commit_before>namespace :aact do
  task :process, [] => :environment do
    updater = Util::Updater.new
    updater.start
  end

  task :delete_previous_month_files, [] => :environment do
    last_month_start = Date.today.last_month.beginning_of_month
    last_month_end = Date.today.last_month.beginning_of_month.end_of_month+1
    files = FileRecord.where(file_type: 'snapshot').
    where(created_at: last_month_start..last_month_end).
    order(created_at: :asc)
    arr_files = files.to_a
    first = arr_files.shift()
    arr_files.each do |file|
      file.destroy
    end
  end
end


<commit_msg>Added the parameter to delete specified file types<commit_after>namespace :aact do
  task :process, [] => :environment do
    updater = Util::Updater.new
    updater.start
  end

  task :delete_previous_month_files(file_type), [] => :environment do
    last_month_start = Date.today.last_month.beginning_of_month
    last_month_end = Date.today.last_month.beginning_of_month.end_of_month+1
    files = FileRecord.where(file_type: file_type).
    where(created_at: last_month_start..last_month_end).
    order(created_at: :asc)
    arr_files = files.to_a
    first = arr_files.shift()
    arr_files.each do |file|
      file.destroy
    end
  end
end



{'fraction_non_alphanumeric': 0.09705648369132856, 'fraction_numerical': 0.0015910898965791568, 'mean_word_length': 3.8384615384615386, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4397567', 'n_tokens_mistral': 435, 'n_tokens_neox': 432, 'n_words': 81}