instance method ensure_connection_ready

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

ensure_connection_ready(allow_retry:, materialize_transactions:)

Ensure the connection is ready to execute a query. Returns whether reconnect-and-restore is available for retry decisions.

Parameters

allow_retry keyreq
materialize_transactions keyreq
Source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 1195
        def ensure_connection_ready(allow_retry:, materialize_transactions:)
          connect! if !connected? && reconnect_can_restore_state?
          self.materialize_transactions if materialize_transactions

          reconnectable = reconnect_can_restore_state?
          verify! unless skip_verification?(allow_retry:, reconnectable:)
          reconnectable
        end

Defined in activerecord/lib/active_record/connection_adapters/abstract_adapter.rb line 1195 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::AbstractAdapter

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close