Sha256: 599d831f130615bfa42d4ff019664d9801bd302370f9976a85a261f5eded4da7

Contents?: true

Size: 296 Bytes

Versions: 4

Compression:

Stored size: 296 Bytes

Contents

# frozen_string_literal: true

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

4 entries across 4 versions & 1 rubygems

Version Path
rapporteur-3.6.4 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.6.3 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.6.2 lib/rapporteur/checks/active_record_check.rb
rapporteur-3.6.1 lib/rapporteur/checks/active_record_check.rb