Sha256: 499f0b0cef9f6c22a2fa994e94455c0b82facbeb9c99474512e14ea1bfc0cc41

Contents?: true

Size: 265 Bytes

Versions: 3

Compression:

Stored size: 265 Bytes

Contents

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rapporteur-3.6.0 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.5.1 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.5.0 lib/rapporteur/checks/active_record_check.rb