lib/tasks/pghero.rake in pghero-2.2.1 vs lib/tasks/pghero.rake in pghero-2.3.0

- old
+ new

@@ -1,21 +1,27 @@ namespace :pghero do - desc "capture query stats" + desc "Capture query stats" task capture_query_stats: :environment do PgHero.capture_query_stats(verbose: true) end - desc "capture space stats" + desc "Capture space stats" task capture_space_stats: :environment do PgHero.capture_space_stats(verbose: true) end - desc "analyze tables" + desc "Analyze tables" task analyze: :environment do PgHero.analyze_all(verbose: true, min_size: ENV["MIN_SIZE_GB"].to_f.gigabytes) end - desc "autoindex" + desc "Autoindex tables" task autoindex: :environment do PgHero.autoindex_all(verbose: true, create: true) + end + + desc "Remove old query stats" + task clean_query_stats: :environment do + puts "Deleting old query stats..." + PgHero.clean_query_stats end end