Sha256: 069a3d10ac921c0cb0c3e1fa8a9ac64863d526cb59f0ad8e4417d5053d3cf903

Contents?: true

Size: 280 Bytes

Versions: 10

Compression:

Stored size: 280 Bytes

Contents

module Rapporteur
  module Checks
    class ActiveRecordCheck
      def self.call(checker)
        ActiveRecord::Base.connection.execute("SELECT current_time AS time").first.fetch('time')
      rescue
        checker.add_error(:database, :unavailable)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rapporteur-3.4.0 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.3.0 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.2.0 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.1.0 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.0.2 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.0.1 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.0.0 lib/rapporteur/checks/active_record_check.rb
rapporteur-2.1.0 lib/rapporteur/checks/active_record_check.rb
rapporteur-2.0.1 lib/rapporteur/checks/active_record_check.rb
rapporteur-2.0.0 lib/rapporteur/checks/active_record_check.rb