Method: OkComputer::SizeThresholdCheck#initialize
- Defined in:
- lib/ok_computer/built_in_checks/size_threshold_check.rb
#initialize(name, threshold, &size_proc) ⇒ SizeThresholdCheck
Public: Initialize a check for a backed-up Resque queue
name - the value that this check should be refered to as threshold - An Integer to compare the size object’s count against to consider
it backed up
size_proc - The block/proc that returns an integer to compare against
Examples
SizeThresholdCheck.new("some queue", 2) do
Queue.new("my_queue").size
end
20 21 22 23 24 |
# File 'lib/ok_computer/built_in_checks/size_threshold_check.rb', line 20 def initialize(name, threshold, &size_proc) self.size_proc = size_proc self.threshold = Integer(threshold) self.name = name end |