Class NewRelic::Agent::Samplers::DelayedJobSampler
In: lib/new_relic/agent/samplers/delayed_job_sampler.rb
Parent: NewRelic::Agent::Sampler

This sampler records the status of your delayed job table once a minute. It assumes jobs are cleared after being run, and failed jobs are not (otherwise the failed job metric is useless).

In earlier versions it will break out the queue length by priority. In later versions of DJ where distinct queues are supported, it breaks it out by queue name.

Methods

Constants

FAILED_QUERY = 'failed_at is not NULL'.freeze
LOCKED_QUERY = 'locked_by is not NULL'.freeze
QUEUE_QUERY_CONDITION = 'run_at <= ? and failed_at is NULL'.freeze

Public Class methods

DelayedJob supports multiple backends, only some of which we can handle. Check whether we think we‘ve got what we need here.

Public Instance methods

[Validate]