DEV: Add hidden s3_inventory_bucket_region site setting (#27786)

This commit adds a hidden `s3_inventory_bucket_region` site setting to
specify the region of the `s3_inventory_bucket` when the `S3Inventory`
class initializes an instance of the `S3Helper`. By default, the
`S3Helper` class uses the value of the `s3_region` site setting but the
region of the `s3_inventory_bucket` is not always the same as the
`s3_region` configured.
This commit is contained in:
Alan Guo Xiang Tan
2024-07-09 12:03:43 +08:00
committed by GitHub
parent 7111d5e4bf
commit 86e5f46175
4 changed files with 28 additions and 3 deletions

View File

@ -16,9 +16,10 @@ class S3Inventory
type,
s3_inventory_bucket:,
preloaded_inventory_file: nil,
preloaded_inventory_date: nil
preloaded_inventory_date: nil,
s3_options: {}
)
@s3_helper = S3Helper.new(s3_inventory_bucket)
@s3_helper = S3Helper.new(s3_inventory_bucket, "", s3_options)
if preloaded_inventory_file && preloaded_inventory_date
# Data preloaded, so we don't need to fetch it again