Class: SidekiqVigil::Check::StuckJobs

Inherits:
Base
  • Object
show all
Defined in:
lib/sidekiq_vigil/check/stuck_jobs.rb

Instance Attribute Summary

Attributes inherited from Base

#api, #clock, #logger, #options, #storage

Instance Method Summary collapse

Methods inherited from Base

#check_name, #execute, #initialize

Constructor Details

This class inherits a constructor from SidekiqVigil::Check::Base

Instance Method Details

#callObject



6
7
8
9
10
11
# File 'lib/sidekiq_vigil/check/stuck_jobs.rb', line 6

def call
  stuck = api.workers.filter_map { |worker| stuck_result(worker) }
  return stuck unless stuck.empty?

  [Result.new(check_name:, severity: :ok, value: 0, threshold: threshold, message: "no stuck jobs")]
end