Merge remote-tracking branch 'parent/main' into upstream-20231214
This commit is contained in:
commit
08a2f557fe
61 changed files with 980 additions and 838 deletions
|
@ -42,13 +42,13 @@ class InlineRenderer
|
|||
private
|
||||
|
||||
def preload_associations_for_status
|
||||
ActiveRecord::Associations::Preloader.new(records: @object, associations: {
|
||||
ActiveRecord::Associations::Preloader.new(records: [@object], associations: {
|
||||
active_mentions: :account,
|
||||
|
||||
reblog: {
|
||||
active_mentions: :account,
|
||||
},
|
||||
})
|
||||
}).call
|
||||
end
|
||||
|
||||
def current_user
|
||||
|
|
|
@ -14,9 +14,8 @@ class Vacuum::PreviewCardsVacuum
|
|||
private
|
||||
|
||||
def vacuum_cached_images!
|
||||
preview_cards_past_retention_period.find_each do |preview_card|
|
||||
preview_card.image.destroy
|
||||
preview_card.save
|
||||
preview_cards_past_retention_period.find_in_batches do |preview_card|
|
||||
AttachmentBatch.new(PreviewCard, preview_card).clear
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue