instance method
active?
Ruby on Rails 7.2.3
Since v2.2.3Signature
active?()
Is this connection alive and ready for queries?
Source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 344
def active?
@lock.synchronize do
return false unless @raw_connection
@raw_connection.query ";"
verified!
end
true
rescue PG::Error
false
end
Defined in activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb line 344
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter