Skip to content

Commit

Permalink
Use float for KEEP_DAYS [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Feb 3, 2023
1 parent e197872 commit 731b2e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tasks/pghero.rake
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ namespace :pghero do
task clean_query_stats: :environment do
puts "Deleting old query stats..."
options = {}
options[:before] = Integer(ENV["KEEP_DAYS"]).days.ago if ENV["KEEP_DAYS"].present?
options[:before] = Float(ENV["KEEP_DAYS"]).days.ago if ENV["KEEP_DAYS"].present?
PgHero.clean_query_stats(**options)
end

desc "Remove old space stats"
task clean_space_stats: :environment do
puts "Deleting old space stats..."
options = {}
options[:before] = Integer(ENV["KEEP_DAYS"]).days.ago if ENV["KEEP_DAYS"].present?
options[:before] = Float(ENV["KEEP_DAYS"]).days.ago if ENV["KEEP_DAYS"].present?
PgHero.clean_space_stats(**options)
end
end

0 comments on commit 731b2e3

Please sign in to comment.