瀏覽代碼

Log cost on timeout errors

Andrew Kane 9 年之前
父節點
當前提交
73ac1e71ef
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/controllers/blazer/queries_controller.rb

+ 1 - 1
app/controllers/blazer/queries_controller.rb

@@ -94,7 +94,7 @@ module Blazer
           audit.error = @error if audit.respond_to?(:error=)
           audit.timed_out = @error == Blazer::TIMEOUT_MESSAGE if audit.respond_to?(:timed_out=)
           audit.cached = @cached_at.present? if audit.respond_to?(:cached=)
-          if !@error && !@cached_at && duration >= 10
+          if !@cached_at && duration >= 10
             audit.cost = @data_source.cost(@statement) if audit.respond_to?(:cost=)
           end
           audit.save! if audit.changed?