diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2018-11-20 17:46:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-20 17:46:56 -0500 |
commit | 4800fd072f2a8349e92cf9386da4b66de712a669 (patch) | |
tree | e8f72cd74c4d2d2ad89a772d60c34d07b0cdb0d9 /activerecord/lib | |
parent | eb22adce9a3a0d8d02c27d7afc944857e9ca0ada (diff) | |
parent | 5ce3e022ef136324d288fb493e0938e76a74981a (diff) | |
download | rails-4800fd072f2a8349e92cf9386da4b66de712a669.tar.gz rails-4800fd072f2a8349e92cf9386da4b66de712a669.tar.bz2 rails-4800fd072f2a8349e92cf9386da4b66de712a669.zip |
Merge pull request #34495 from rails/make-connection-handler-per-thread-not-per-fiber
Make connection handler per thread instead of per fiber
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/core.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 50f3087c51..8f4d292a4b 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -129,11 +129,11 @@ module ActiveRecord self.filter_attributes = [] def self.connection_handler - ActiveRecord::RuntimeRegistry.connection_handler || default_connection_handler + Thread.current.thread_variable_get("ar_connection_handler") || default_connection_handler end def self.connection_handler=(handler) - ActiveRecord::RuntimeRegistry.connection_handler = handler + Thread.current.thread_variable_set("ar_connection_handler", handler) end self.default_connection_handler = ConnectionAdapters::ConnectionHandler.new |