5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-18 10:36:23 +00:00

fixup! feat: hacer limpieza de emergencia #12854

This commit is contained in:
f 2023-03-29 15:26:23 -03:00
parent 28c51cab01
commit 1d03583b2c
2 changed files with 4 additions and 2 deletions

View file

@ -1,3 +1,3 @@
cleanup: bundle exec rake cleanup:everything
stats: bundle exec rake stats:process_all
emergency_cleanup: bundle exec rake cleanup:everything[7]
emergency_cleanup: bundle exec rake cleanup:everything BEFORE=7

View file

@ -3,6 +3,8 @@
namespace :cleanup do
desc 'Cleanup sites'
task everything: :environment do |_, args|
CleanupJob.perform_later((args.extras.first || 30).to_i.days.ago)
before = ENV.fetch('BEFORE', '30').to_i.days.ago
CleanupJob.perform_later(before)
end
end