lib/sidekiq/expected_failures.rb in sidekiq-expected_failures-0.2.3 vs lib/sidekiq/expected_failures.rb in sidekiq-expected_failures-0.2.4

- old
+ new

@@ -33,11 +33,11 @@ def self.clear_all clear(dates.keys) end - def self.clear_old - range = dates.keys.delete_if { |d| Date.parse(d) > Date.today.prev_day } + def self.clear_old(days_ago = 1) + range = dates.keys.delete_if { |d| Date.parse(d) > Date.today.prev_day(days_ago) } clear(range) end def self.clear_counters Sidekiq.redis { |r| r.del("expected:count") }