mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 20:46:22 +00:00
poder hacer limpieza desde la terminal
This commit is contained in:
parent
9fefc0f554
commit
170cbeb69e
1 changed files with 11 additions and 0 deletions
11
lib/tasks/cleanup.rake
Normal file
11
lib/tasks/cleanup.rake
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
namespace :cleanup do
|
||||||
|
desc 'Cleanup sites'
|
||||||
|
task everything: :environment do
|
||||||
|
before = ENV.fetch('BEFORE', '30').to_i.days.ago
|
||||||
|
service = CleanupService.new(before: before)
|
||||||
|
|
||||||
|
service.cleanup_everything!
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue