0
0
Fork 0

Add created_before and updated_before scopes to MediaAttachment (#28869)

This commit is contained in:
Matt Jankowski 2024-01-24 05:32:54 -05:00 committed by GitHub
parent a11a2fb052
commit 7a1f087659
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 8 deletions

View file

@ -120,7 +120,7 @@ module Mastodon::CLI
say('Beginning removal of now-orphaned media attachments to free up disk space...')
scope = MediaAttachment.unattached.where('created_at < ?', options[:days].pred.days.ago)
scope = MediaAttachment.unattached.created_before(options[:days].pred.days.ago)
processed = 0
removed = 0
progress = create_progress_bar(scope.count)