aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/log_subscriber.rb
diff options
context:
space:
mode:
authorwangjohn <wangjohn@mit.edu>2013-04-09 16:29:36 -0400
committerwangjohn <wangjohn@mit.edu>2013-04-09 22:27:32 -0400
commit95ac3913ee24efa1c5a9789963697aaa6e5b32b7 (patch)
treec164100facb9752b8513e62d30a05657c4a390a6 /activerecord/lib/active_record/log_subscriber.rb
parente94f024e142526181ab98714f919cc2d5c4c394a (diff)
downloadrails-95ac3913ee24efa1c5a9789963697aaa6e5b32b7.tar.gz
rails-95ac3913ee24efa1c5a9789963697aaa6e5b32b7.tar.bz2
rails-95ac3913ee24efa1c5a9789963697aaa6e5b32b7.zip
Created a runtime registry for thread local variables in active record.
Diffstat (limited to 'activerecord/lib/active_record/log_subscriber.rb')
-rw-r--r--activerecord/lib/active_record/log_subscriber.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb
index c1ba524c84..69371a1dab 100644
--- a/activerecord/lib/active_record/log_subscriber.rb
+++ b/activerecord/lib/active_record/log_subscriber.rb
@@ -3,11 +3,11 @@ module ActiveRecord
IGNORE_PAYLOAD_NAMES = ["SCHEMA", "EXPLAIN"]
def self.runtime=(value)
- Thread.current[:active_record_sql_runtime] = value
+ ActiveRecord::RuntimeRegistry.instance.sql_runtime = value
end
def self.runtime
- Thread.current[:active_record_sql_runtime] ||= 0
+ ActiveRecord::RuntimeRegistry.instance.sql_runtime ||= 0
end
def self.reset_runtime