diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/mastodon.rake | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 78def7b51..94da0904c 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -2,9 +2,7 @@ namespace :mastodon do namespace :media do desc 'Removes media attachments that have not been assigned to any status for longer than a day' task clear: :environment do - MediaAttachment.where(status_id: nil).where('created_at < ?', 1.day.ago).find_each do |m| - m.destroy - end + MediaAttachment.where(status_id: nil).where('created_at < ?', 1.day.ago).find_each(&:destroy) end end |