lib/breakers/uptime_middleware.rb in breakers-0.3.0 vs lib/breakers/uptime_middleware.rb in breakers-0.4.0
- old
+ new
@@ -52,10 +52,10 @@
end
def handle_request(service:, request_env:, current_outage: nil)
start_time = Time.now
return @app.call(request_env).on_complete do |response_env|
- response_env[:duration] = Time.now - start_time
+ response_env[:duration] = (Time.now - start_time) * 1000
if response_env.status >= 500
handle_error(
service: service,
request_env: request_env,
response_env: response_env,