class OkComputer::ResqueDownCheck
Public Instance Methods
check()
click to toggle source
Public: Check
whether Resque workers are working
# File lib/ok_computer/built_in_checks/resque_down_check.rb, line 4 def check if queued? and not working? mark_failure mark_message "Resque is DOWN. No workers are working the queue." else mark_message "Resque is working" end end
queued?()
click to toggle source
Public: Whether the given Resque queue has jobs
Returns a Boolean
# File lib/ok_computer/built_in_checks/resque_down_check.rb, line 16 def queued? Resque.info.fetch(:pending) > 10 end
working?()
click to toggle source
Public: Whether the Resque has workers working on a job
Returns a Boolean
# File lib/ok_computer/built_in_checks/resque_down_check.rb, line 23 def working? Resque.info.fetch(:working) > 0 end