Class: Pose::Jobs::Vacuum
- Inherits:
-
Object
- Object
- Pose::Jobs::Vacuum
- Defined in:
- lib/pose/jobs/vacuum.rb
Overview
Cleans up unused data in the search index.
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/pose/jobs/vacuum.rb', line 8 def perform puts "Cleaning Pose search index...\n\n" = ProgressBar.create title: ' assignments', total: Pose::Assignment.count Pose::Assignment.cleanup_orphaned_pose_assignments .finish = ProgressBar.create title: ' words', total: Pose::Word.count Pose::Word.remove_unused_words .finish puts "\nPose search index cleanup complete.\n\n" end |