aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2016-10-06 12:09:51 -0400
committerGitHub <noreply@github.com>2016-10-06 12:09:51 -0400
commitfd9abbc4461021d8bed72f5a34745a8271f02d85 (patch)
tree1dbb058cd587d149103717782e9951314ba3aa45 /activerecord/lib/active_record
parentbf5876af099fbbcabab9d4f5296cc6ac76e10d31 (diff)
parentb67e260cd58f78596e6145727593fa47705b503f (diff)
downloadrails-fd9abbc4461021d8bed72f5a34745a8271f02d85.tar.gz
rails-fd9abbc4461021d8bed72f5a34745a8271f02d85.tar.bz2
rails-fd9abbc4461021d8bed72f5a34745a8271f02d85.zip
Merge pull request #24963 from fertapric/recover-db-runtime-on-production-logs
Fix database runtimes on production log
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/log_subscriber.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb
index b27e84a5be..ad71c6cde8 100644
--- a/activerecord/lib/active_record/log_subscriber.rb
+++ b/activerecord/lib/active_record/log_subscriber.rb
@@ -26,9 +26,8 @@ module ActiveRecord
end
def sql(event)
- return unless logger.debug?
-
self.class.runtime += event.duration
+ return unless logger.debug?
payload = event.payload