instance method
flush_idle_connections!
Ruby on Rails 6.1.7.10
Since v5.2.8.1Signature
flush_idle_connections!(role = ActiveRecord::Base.current_role)
Disconnects all currently idle connections.
See ConnectionPool#flush! for details.
Parameters
-
roleopt = ActiveRecord::Base.current_role
Source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 1103
def flush_idle_connections!(role = ActiveRecord::Base.current_role)
connection_pool_list(role).each(&:flush!)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb line 1103
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::ConnectionHandler