mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 13:09:33 -06:00
DEV: remove unused method (rake task deleted in 6a274fd
)
This commit is contained in:
parent
3b8819f0ab
commit
388433ec06
@ -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 = []
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user