Class: Sidekiq::Stats::History
- Inherits:
-
Object
- Object
- Sidekiq::Stats::History
- Defined in:
- lib/sidekiq/api.rb
Instance Method Summary collapse
- #failed ⇒ Object
-
#initialize(days_previous, start_date = nil, pool: nil) ⇒ History
constructor
A new instance of History.
- #processed ⇒ Object
Constructor Details
#initialize(days_previous, start_date = nil, pool: nil) ⇒ History
Returns a new instance of History.
180 181 182 183 184 185 |
# File 'lib/sidekiq/api.rb', line 180 def initialize(days_previous, start_date = nil, pool: nil) # we only store five years of data in Redis raise ArgumentError if days_previous < 1 || days_previous > (5 * 365) @days_previous = days_previous @start_date = start_date || Time.now.utc.to_date end |
Instance Method Details
#failed ⇒ Object
191 192 193 |
# File 'lib/sidekiq/api.rb', line 191 def failed @failed ||= date_stat_hash("failed") end |
#processed ⇒ Object
187 188 189 |
# File 'lib/sidekiq/api.rb', line 187 def processed @processed ||= date_stat_hash("processed") end |