Class: Liveness::Dependencies::MySQL
- Inherits:
-
Liveness::Dependency
- Object
- Liveness::Dependency
- Liveness::Dependencies::MySQL
- Defined in:
- lib/liveness/dependencies/mysql.rb
Overview
The MySQL Provider
Instance Attribute Summary
Attributes inherited from Liveness::Dependency
Instance Method Summary collapse
Methods inherited from Liveness::Dependency
#alive?, #connect, #initialize, #status
Constructor Details
This class inherits a constructor from Liveness::Dependency
Instance Method Details
#check! ⇒ Object
13 14 15 16 17 18 |
# File 'lib/liveness/dependencies/mysql.rb', line 13 def check! # TODO: Add Sequel Support return false unless defined?(ActiveRecord::Base) ActiveRecord::Base.connection.exec_query('SELECT 1 as ping')&.first&.[]('ping')&.to_s == '1' end |