method
recycle!
rails latest stable - Class:
ActiveRecord::ConnectionAdapters::ConnectionPool
Method not available on this version
This method is only available on newer versions. The first available version (v8.1.1) is shown here.
recycle!()public
Immediately mark all current connections as due for replacement, equivalent to them having reached max_age – even if there is no max_age configured.
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 841
def recycle!
synchronize do
return if self.discarded?
@connections.each do |conn|
conn.force_retirement
end
end
retire_old_connections
end Related methods
- Instance methods
- activate
- activated?
- active_connection
- active_connection?
- checkin
- checkout
- clear_reloadable_connections
- clear_reloadable_connections!
- connected?
- connection_descriptor
- connections
- discard!
- discarded?
- disconnect
- disconnect!
- flush
- flush!
- inspect
- internal_metadata
- keep_alive
- lease_connection
- maintainable?
- migration_context
- migrations_paths
- new_connection
- num_available_in_queue
- num_waiting_in_queue
- permanent_lease?
- pin_connection!
- pool_transaction_isolation_level
- pool_transaction_isolation_level=
- preconnect
- prepopulate
- reap
- reaper_lock
- recycle!
- release_connection
- remove
- retire_old_connections
- schedule_query
- schema_cache
- schema_migration
- schema_reflection=
- stat
- unpin_connection!
- with_connection
- with_pool_transaction_isolation_level
- Class methods
- install_executor_hooks
- new
- Private methods
-
acquire_connection -
adopt_connection -
attempt_to_checkout_all_existing_connections -
build_async_executor -
bulk_make_new_connections -
checkout_and_verify -
checkout_for_exclusive_access -
checkout_for_maintenance -
checkout_new_connection -
connection_lease -
name_inspect -
release -
remove_connection_from_thread_cache -
remove_from_maintenance -
return_from_maintenance -
sequential_maintenance -
shard_inspect -
try_to_checkout_new_connection -
try_to_queue_for_background_connection -
with_exclusively_acquired_all_connections -
with_new_connections_blocked