FIX: `Jobs::EnsureS3UploadsExistence` broken for multisite (#27401)

This is a follow-up to 8cf4ed5f88.
This commit is contained in:
Alan Guo Xiang Tan 2024-06-10 16:26:39 +08:00 committed by GitHub
parent 95ed8d05bf
commit adc824a9bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -15,8 +15,8 @@ module Jobs
end
end
def prepare_for_all_sites
inventory = S3Inventory.new(s3_helper, :upload)
def prepare_for_all_sites(s3_inventory_bucket)
inventory = S3Inventory.new(:upload, s3_inventory_bucket:)
@db_inventories = inventory.prepare_for_all_sites
@inventory_date = inventory.inventory_date
end
@ -25,7 +25,7 @@ module Jobs
return if (s3_inventory_bucket = SiteSetting.s3_inventory_bucket).blank?
if !@db_inventories && Rails.configuration.multisite && GlobalSetting.use_s3?
prepare_for_all_sites
prepare_for_all_sites(s3_inventory_bucket)
end
if @db_inventories &&

View File

@ -0,0 +1 @@