Added ActiveRecord connections close on Thread end