Sha256: ae08bd63f1e0545094176915d55ae301105d33236ae28b99d4f0b29c5c8a0f1d

Contents?: true

Size: 278 Bytes

Versions: 3

Compression:

Stored size: 278 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

3 entries across 3 versions & 1 rubygems

Version Path
rapporteur-1.1.0 lib/rapporteur/checks/active_record_check.rb
rapporteur-1.0.1 lib/rapporteur/checks/active_record_check.rb
rapporteur-1.0.0 lib/rapporteur/checks/active_record_check.rb