lib/breakers/uptime_middleware.rb in breakers-0.2.0 vs lib/breakers/uptime_middleware.rb in breakers-0.2.1
- old
+ new
@@ -7,9 +7,13 @@
def initialize(app)
super(app)
end
def call(request_env)
+ if Breakers.disabled?
+ return @app.call(request_env)
+ end
+
service = Breakers.client.service_for_request(request_env: request_env)
if !service
return @app.call(request_env)
end