Class: OkComputer::ResqueSchedulerCheck

Inherits:
Check
  • Object
show all
Defined in:
lib/ok_computer/built_in_checks/resque_scheduler_check.rb

Constant Summary

Constants inherited from Check

Check::CheckNotDefined

Instance Attribute Summary

Attributes inherited from Check

#failure_occurred, #message, #registrant_name, #time

Instance Method Summary collapse

Methods inherited from Check

#<=>, #clear, #mark_failure, #mark_message, #run, #success?, #to_json, #to_text, #with_benchmarking

Instance Method Details

#checkObject



3
4
5
6
7
8
9
10
# File 'lib/ok_computer/built_in_checks/resque_scheduler_check.rb', line 3

def check
  if working?
    mark_message 'Resque Scheduler is UP'
  else
    mark_failure
    mark_message 'Resque Scheduler is DOWN'
  end
end

#working?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/ok_computer/built_in_checks/resque_scheduler_check.rb', line 12

def working?
  Resque.keys.any?{|k| k == 'resque_scheduler_master_lock'}
end