FEATURE: rename task to posts:destroy_old_data_exports

FEATURE: rename task to posts:destroy_old_data_exports

Previously we were only catching one type of data export, the new job will catch every csv export we have

Job is pretty safe as it filters on system user id / pm with a particular slug

diff --git a/lib/tasks/posts.rake b/lib/tasks/posts.rake
index 186e656..c5d7d58 100644
--- a/lib/tasks/posts.rake
+++ b/lib/tasks/posts.rake
@@ -494,16 +494,16 @@ task 'posts:missing_uploads', [:single_site] => :environment do |_, args|
   end
 end
 
-def destroy_old_user_data_exports
+def destroy_old_data_exports
   topics = Topic.with_deleted.where(<<~SQL, 2.days.ago)
-    slug = 'user-archive-data-export-complete' AND
+    slug = '%-export-complete' AND
     archetype = 'private_message' AND
     posts_count = 1 AND
     created_at < ? AND
     user_id = -1
   SQL
 
-  puts "Found #{topics.count} old user data exports on #{RailsMultisite::ConnectionManagement.current_db}, destroying"
+  puts "Found #{topics.count} old CSV data exports on #{RailsMultisite::ConnectionManagement.current_db}, destroying"
   puts
   topics.each do |t|
     Topic.transaction do
@@ -516,12 +516,12 @@ def destroy_old_user_data_exports
 end
 
 desc 'destroys all user archive PMs (they may contain broken images)'
-task 'posts:destroy_old_user_data_exports' => :environment do
+task 'posts:destroy_old_data_exports' => :environment do
   if RailsMultisite::ConnectionManagement.current_db != "default"
-    destroy_old_user_data_exports
+    destroy_old_data_exports
   else
     RailsMultisite::ConnectionManagement.each_connection do
-      destroy_old_user_data_exports
+      destroy_old_data_exports
     end
   end
 end

GitHub sha: 96e58125