Sha256: 9b5a39fa72f03ff7cd584f23f6dea2cd9d275edb4d2e2915d675096d80d765cb

Contents?: true

Size: 590 Bytes

Versions: 29

Compression:

Stored size: 590 Bytes

Contents

# frozen_string_literal: true

module Hyrax
  module HealthChecks
    class SolrCheck < OkComputer::Check
      def initialize(service: Hyrax::SolrService)
        @service = service
      end

      def check
        return if @service.ping

        mark_message 'Solr connection failed'
        mark_failure
      rescue RSolr::Error::ConnectionRefused => err
        mark_message "Solr connection refused: #{err.message}"
        mark_failure
      rescue RuntimeError => err
        mark_message "Solr connection failed: #{err.message}"
        mark_failure
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 lib/hyrax/health_checks/solr_check.rb
hyrax-5.0.4 lib/hyrax/health_checks/solr_check.rb
hyrax-5.0.3 lib/hyrax/health_checks/solr_check.rb
hyrax-5.0.2 lib/hyrax/health_checks/solr_check.rb
hyrax-5.0.1 lib/hyrax/health_checks/solr_check.rb
hyrax-5.0.0 lib/hyrax/health_checks/solr_check.rb
hyrax-5.0.0.rc3 lib/hyrax/health_checks/solr_check.rb
hyrax-5.0.0.rc2 lib/hyrax/health_checks/solr_check.rb
hyrax-5.0.0.rc1 lib/hyrax/health_checks/solr_check.rb
hyrax-3.6.0 lib/hyrax/health_checks/solr_check.rb
hyrax-4.0.0 lib/hyrax/health_checks/solr_check.rb
hyrax-4.0.0.rc3 lib/hyrax/health_checks/solr_check.rb
hyrax-4.0.0.rc2 lib/hyrax/health_checks/solr_check.rb
hyrax-4.0.0.rc1 lib/hyrax/health_checks/solr_check.rb
hyrax-3.5.0 lib/hyrax/health_checks/solr_check.rb
hyrax-4.0.0.beta2 lib/hyrax/health_checks/solr_check.rb
hyrax-3.4.2 lib/hyrax/health_checks/solr_check.rb
hyrax-4.0.0.beta1 lib/hyrax/health_checks/solr_check.rb
hyrax-3.4.1 lib/hyrax/health_checks/solr_check.rb
hyrax-3.4.0 lib/hyrax/health_checks/solr_check.rb