FIX: refactor calling of timed backup deletion

refactor calling of timed backup deletion so it runs regardless of SiteSetting.automatic_backups_enabled value
This commit is contained in:
marstall
2024-01-08 15:41:00 -05:00
committed by GitHub
parent c62d1197b9
commit 3837657449
6 changed files with 38 additions and 17 deletions

View File

@ -131,9 +131,13 @@ module BackupRestore
def unsorted_files
objects = []
s3_helper.list.each do |obj|
objects << create_file_from_object(obj) if obj.key.match?(file_regex)
end
begin
s3_helper.list.each do |obj|
objects << create_file_from_object(obj) if obj.key.match?(file_regex)
end
rescue StandardError
NoMethodError
end #fired when s3_helper.list is nil - wont respond to .nil?
objects
rescue Aws::Errors::ServiceError => e