module InstJobsStatsd::Stats::Periodic::Failed

Public Class Methods

enable() click to toggle source
# File lib/inst_jobs_statsd/stats/periodic/failed.rb, line 5
def self.enable
  enable_failed_depth
end
enable_failed_depth() click to toggle source
# File lib/inst_jobs_statsd/stats/periodic/failed.rb, line 9
def self.enable_failed_depth
  Periodic.enable_callbacks
  Periodic.add(-> { report_failed_depth })
end
report_failed_depth() click to toggle source
# File lib/inst_jobs_statsd/stats/periodic/failed.rb, line 14
def self.report_failed_depth
  count = Delayed::Job::Failed.count
  Periodic.report_gauge(:failed_depth, count)
end