Remove unneeded Rake tasks

This commit is contained in:
Karina Kwiatek 2022-07-09 02:25:08 +02:00 committed by Georg Gadinger
parent 5155b6dee7
commit 31e9d7ac80
1 changed files with 0 additions and 35 deletions

View File

@ -10,23 +10,6 @@ task :default do
end
namespace :justask do
desc "Regenerate themes"
task themes: :environment do
format = '%t (%c/%C) [%b>%i] %e'
all = Theme.all
progress = ProgressBar.create title: 'Processing themes', format: format, starting_at: 0, total: all.count
all.each do |theme|
theme.touch
theme.save!
progress.increment
end
puts "regenerated #{all.count} themes"
end
desc "Upload to AWS"
task paperclaws: :environment do
if APP_CONFIG["fog"]["credentials"].nil? or APP_CONFIG["fog"]["credentials"]["provider"] != "AWS"
@ -245,24 +228,6 @@ namespace :justask do
puts "Removed #{removed} users"
end
desc "Fixes the notifications"
task fix_notifications: :environment do
format = '%t (%c/%C) [%b>%i] %e'
total = Notification.count
progress = ProgressBar.create title: 'Processing notifications', format: format, starting_at: 0, total: total
destroyed_count = 0
Notification.all.each do |n|
if n.target.nil?
n.destroy
destroyed_count += 1
end
progress.increment
end
puts "Purged #{destroyed_count} dead notifications."
end
desc "Subscribes everyone to their answers"
task fix_submarines: :environment do
format = '%t (%c/%C) [%b>%i] %e'