instance method
checkout_for_maintenance
Ruby on Rails 8.1.2
Since v8.1.2 PrivateSignature
checkout_for_maintenance(conn)
Directly check a specific connection out of the pool. Skips callbacks.
The connection must later either #return_from_maintenance or #remove_from_maintenance, or the pool will hang.
Parameters
-
connreq
Source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 987
def checkout_for_maintenance(conn)
synchronize do
@maintaining += 1
@available.delete(conn)
conn.lease
conn
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb line 987
· View on GitHub
· Improve this page
· Find usages on GitHub