This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################### | |
# | |
# This is hacked from the original code for Rails 4.1. Owen went in and hacked the ConnectionPool | |
# so it's not fool proof but prevents ShopHotelsCommand from grabbing dozens of idle DB connections. | |
# | |
# If you create a thread yourself, if it uses ActiveRecord objects without | |
# explicitly checking out a connection, one will still be checked out implicitly. | |
# If it is never checked back in with `ActiveRecord::Base.clear_active_connections!`, | |
# then it will be leaked. | |
# |