mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-03 03:03:04 +08:00
sets file duration to 7 days
This commit is contained in:
parent
317739af1e
commit
8bbac0e3ab
1 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
namespace :exportable_items do
|
||||
desc 'Removes exportable zip files if older than 3 days'
|
||||
desc 'Removes exportable zip files if older than 7 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"
|
||||
ZipExport.where('created_at < ?', 7.days.ago).destroy_all
|
||||
puts "All exportable zip files older than '#{7.days.ago}' have been removed"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue