mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-10 08:55:03 +08:00
8 lines
275 B
Ruby
8 lines
275 B
Ruby
|
namespace :exportable_items do
|
||
|
desc 'Removes exportable zip files if older than 3 days'
|
||
|
task cleanup: :environment do
|
||
|
ZipExport.where('created_at < ?', 3.days.ago).destroy_all
|
||
|
puts "All exportable zip files older than '#{3.days.ago}' have been removed"
|
||
|
end
|
||
|
end
|