mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 14:11:16 +08:00
FIX: S3Inventory
to ignore files older than last backup restore date (#27166)
This commit updates `S3Inventory#files` to ignore S3 inventory files which have a `last_modified` timestamp which are not at least 2 days older than `BackupMetadata.last_restore_date` timestamp. This check was previously only in `Jobs::EnsureS3UploadsExistence` but `S3Inventory` can also be used via Rake tasks so this protection needs to be in `S3Inventory` and not in the scheduled job.
This commit is contained in:

committed by
GitHub

parent
a4c5f85b10
commit
df16ab0758
@ -27,6 +27,7 @@ class S3Helper
|
||||
|
||||
def initialize(s3_bucket_name, tombstone_prefix = "", options = {})
|
||||
@s3_client = options.delete(:client)
|
||||
@s3_bucket = options.delete(:bucket)
|
||||
@s3_options = default_s3_options.merge(options)
|
||||
|
||||
@s3_bucket_name, @s3_bucket_folder_path =
|
||||
|
Reference in New Issue
Block a user