Merge remote-tracking branch 'parent/main' into upstream-20240125

This commit is contained in:
KMY 2024-01-25 18:15:21 +09:00
commit 9fa938eb0f
68 changed files with 824 additions and 94 deletions

View file

@ -27,11 +27,17 @@ class Vacuum::MediaAttachmentsVacuum
end
def media_attachments_past_retention_period
MediaAttachment.remote.cached.where(MediaAttachment.arel_table[:created_at].lt(@retention_period.ago)).where(MediaAttachment.arel_table[:updated_at].lt(@retention_period.ago))
MediaAttachment
.remote
.cached
.created_before(@retention_period.ago)
.updated_before(@retention_period.ago)
end
def orphaned_media_attachments
MediaAttachment.unattached.where(MediaAttachment.arel_table[:created_at].lt(TTL.ago))
MediaAttachment
.unattached
.created_before(TTL.ago)
end
def retention_period?