Sha256: f21fd24505835284b224e457d8dc652b20357da23581a6c478bee174e5054315

Contents?: true

Size: 798 Bytes

Versions: 34

Compression:

Stored size: 798 Bytes

Contents

require "govuk_app_config/govuk_healthcheck/checkup"
require "govuk_app_config/govuk_healthcheck/active_record"
require "govuk_app_config/govuk_healthcheck/sidekiq_redis"
require "govuk_app_config/govuk_healthcheck/threshold_check"
require "govuk_app_config/govuk_healthcheck/sidekiq_queue_check"
require "govuk_app_config/govuk_healthcheck/sidekiq_queue_latency_check"
require "govuk_app_config/govuk_healthcheck/sidekiq_queue_size_check"
require "govuk_app_config/govuk_healthcheck/sidekiq_retry_size_check"
require "json"

module GovukHealthcheck
  def self.rack_response(*checks)
    proc do
      [
        200,
        {"Content-Type" => "application/json"},
        [JSON.dump(healthcheck(checks))]
      ]
    end
  end

  def self.healthcheck(checks)
    Checkup.new(checks).run
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
govuk_app_config-2.2.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.1.2 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.1.1 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.1.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.0.3 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.0.2 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.0.1 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.0.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.20.2 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.20.1 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.20.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.19.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.18.1 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.17.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.16.3 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.16.1 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.16.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.15.1 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.15.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-1.14.0 lib/govuk_app_config/govuk_healthcheck.rb