class OkComputer::ResqueBackedUpCheck

Attributes

queue[RW]
threshold[RW]

Public Class Methods

new(queue, threshold) click to toggle source

Public: Initialize a check for a backed-up Resque queue

queue - The name of the Resque queue to check threshold - An Integer to compare the queue's count against to consider

it backed up
# File lib/ok_computer/built_in_checks/resque_backed_up_check.rb, line 11
def initialize(queue, threshold)
  self.queue = queue
  self.threshold = Integer(threshold)
  self.name = "Resque queue '#{queue}'"
end

Public Instance Methods

size() click to toggle source

Public: The number of jobs in the check's queue

# File lib/ok_computer/built_in_checks/resque_backed_up_check.rb, line 18
def size
  Resque.size(queue)
end