Sha256: fa0de51beccce955b56a75835e5dfc9eb61fef64e1e3c15eabd592d08c9e2642
Contents?: true
Size: 680 Bytes
Versions: 13
Compression:
Stored size: 680 Bytes
Contents
# frozen_string_literal: true module Orchestration module Services module Database class Healthcheck include HealthcheckBase dependencies 'active_record' def connect return if settings[:adapter] == 'sqlite3' ActiveRecord::Base.establish_connection(settings) ActiveRecord::Base.connection end def connection_errors [ActiveRecord::ConnectionNotEstablished].concat(adapter_errors) end private def adapter_errors @configuration.adapter.errors end def settings @configuration.settings end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems