Class: TpCommon::FileStorage::Cleaners::Cleaner

Inherits:
Base
  • Object
show all
Defined in:
lib/tp_common/file_storage/cleaners/cleaner.rb

Overview

Delete files on file storage service. Please handle with care

Constant Summary

Constants inherited from Base

Base::MAX_RETRIES

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from TpCommon::FileStorage::Base

Instance Method Details

#clean(files) ⇒ Object

Expect an array of file key to delete.



10
11
12
# File 'lib/tp_common/file_storage/cleaners/cleaner.rb', line 10

def clean(files)
  connection.delete_multiple_objects(@directory_path, files.map{|file_key| mask_key(file_key) })
end