Class: Renalware::UKRDC::Housekeeping::RemoveOldExportArchiveFolders
- Inherits:
-
Object
- Object
- Renalware::UKRDC::Housekeeping::RemoveOldExportArchiveFolders
- Defined in:
- app/models/renalware/ukrdc/housekeeping/remove_old_export_archive_folders.rb
Overview
Responsible for cleaning up old archive folders that are created each time the ukrdc:export task has run. Each archive folder’s name has a batch number in it which is the id of the UKRDC::Batch model created at the start of each export. We can find the folders to remove by extracting the batch number from the folder name and deleting the folder if that batch is no longer ‘recent’. Called from a housekeeping rake task.
Defined Under Namespace
Classes: ArchiveFolder
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call ⇒ Object
16 17 18 |
# File 'app/models/renalware/ukrdc/housekeeping/remove_old_export_archive_folders.rb', line 16 def self.call new.call end |
Instance Method Details
#call ⇒ Object
20 21 22 |
# File 'app/models/renalware/ukrdc/housekeeping/remove_old_export_archive_folders.rb', line 20 def call remove_old_archives end |