mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user