Module: Resque::Plugins::JobStats::Timeseries::Enqueued

Includes:
MeasuredHook, Common
Included in:
Resque::Plugins::JobStats
Defined in:
lib/resque/plugins/job_stats/timeseries.rb

Instance Method Summary collapse

Methods included from Common

#timestamp

Methods included from MeasuredHook

included, #inherited

Instance Method Details

#after_enqueue_job_stats_timeseries(*args) ⇒ Object

Increments the enqueued count for the timestamp when job is queued



64
65
66
# File 'lib/resque/plugins/job_stats/timeseries.rb', line 64

def after_enqueue_job_stats_timeseries(*args)
  incr_timeseries(:enqueued)
end

#queued_per_hourObject

Hash of timeseries data over the last 24 hours for queued jobs



74
75
76
# File 'lib/resque/plugins/job_stats/timeseries.rb', line 74

def queued_per_hour
  timeseries_data(:enqueued, 24, :hours)
end

#queued_per_minuteObject

Hash of timeseries data over the last 60 minutes for queued jobs



69
70
71
# File 'lib/resque/plugins/job_stats/timeseries.rb', line 69

def queued_per_minute
  timeseries_data(:enqueued, 60, :minutes)
end