Add created_before
and updated_before
scopes to MediaAttachment
(#28869)
This commit is contained in:
parent
a11a2fb052
commit
7a1f087659
3 changed files with 16 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue