Browse Source

CLDC-4406: Update rake name to delete old logs

considering this is a very dangerous script best not to leave the name slightly ambiguous (since it deletes from the given year and before)
pull/3311/head
samyou-softwire 3 weeks ago
parent
commit
176111ce39
  1. 2
      lib/tasks/delete_logs_in_collection_year_and_earlier.rake

2
lib/tasks/delete_logs_before_year.rake → lib/tasks/delete_logs_in_collection_year_and_earlier.rake

@ -1,5 +1,5 @@
desc "Deletes all logs in a given collection year and earlier. Note that this operation is PERMANENT and this will bypass callbacks/paper trail. Use only as instructed in a yearly cleanup task." desc "Deletes all logs in a given collection year and earlier. Note that this operation is PERMANENT and this will bypass callbacks/paper trail. Use only as instructed in a yearly cleanup task."
task :delete_logs_before_year, %i[year] => :environment do |_task, args| task :delete_logs_in_collection_year_and_earlier, %i[year] => :environment do |_task, args|
year = args[:year].to_i year = args[:year].to_i
if year < 2020 if year < 2020
Loading…
Cancel
Save