Class: Heartcheck::Checks::Process
- Defined in:
- lib/heartcheck/checks/process.rb
Instance Attribute Summary
Attributes inherited from Base
#dev, #doc_url, #functional, #name, #timeout
Instance Method Summary collapse
Methods inherited from Base
#add_service, #check, #informations, #initialize, #inspect, #on_error, #register_dynamic_services, #services, #to_validate, #uri_info
Constructor Details
This class inherits a constructor from Heartcheck::Checks::Base
Instance Method Details
#validate ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/heartcheck/checks/process.rb', line 4 def validate services.each do |service| begin pid = get_pid(service) ::Process.kill(0, pid) rescue Errno::ESRCH append_error(service, pid) end end end |