2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-28 20:47:42 +00:00
moebooru/lib/tasks/maint.rake

23 lines
439 B
Ruby
Raw Normal View History

namespace :maint do
desc 'fix_tags'
task :fix_tags => :environment do
# Fix post counts
Tag.recalculate_post_count
# Fix cached tags
Post.recalculate_cached_tags
Post.recalculate_has_children
end
desc 'Recalculate post counts'
task :recalculate_row_count => :environment do
Post.recalculate_row_count
end
desc 'Purge unused tags'
task :purge_tags => :environment do
Tag.purge_tags
end
end