DEV: remove unused method (rake task deleted in 6a274fd)

This commit is contained in:
Arpit Jalan 2019-05-31 11:15:35 +05:30
parent 3b8819f0ab
commit 388433ec06
1 changed files with 0 additions and 21 deletions

View File

@ -506,27 +506,6 @@ task 'posts:missing_uploads', [:single_site] => :environment do |_, args|
end
end
def destroy_old_data_exports
topics = Topic.with_deleted.where(<<~SQL, 2.days.ago)
slug LIKE '%-export-complete' AND
archetype = 'private_message' AND
posts_count = 1 AND
created_at < ? AND
user_id = -1
SQL
puts "Found #{topics.count} old CSV data exports on #{RailsMultisite::ConnectionManagement.current_db}, destroying"
puts
topics.each do |t|
Topic.transaction do
t.posts.first.destroy!
t.destroy!
print "."
end
end
puts "done"
end
def recover_uploads_from_index(path)
lookup = []