mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 16:28:08 +01:00
Change preview card deletes to be done using batch method (#28183)
This commit is contained in:
parent
490e4969a1
commit
afc8550b63
1 changed files with 2 additions and 3 deletions
|
@ -14,9 +14,8 @@ class Vacuum::PreviewCardsVacuum
|
||||||
private
|
private
|
||||||
|
|
||||||
def vacuum_cached_images!
|
def vacuum_cached_images!
|
||||||
preview_cards_past_retention_period.find_each do |preview_card|
|
preview_cards_past_retention_period.find_in_batches do |preview_card|
|
||||||
preview_card.image.destroy
|
AttachmentBatch.new(PreviewCard, preview_card).clear
|
||||||
preview_card.save
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue