From 5910f7600459cf1167492617c3e001c80c90c941 Mon Sep 17 00:00:00 2001 From: rpereira2 Date: Tue, 2 Apr 2019 19:18:26 +0530 Subject: Remove unnecessary line - calculate_reactive_cache does not need to initialize @prometheus_owner again. It's already being initialized in the initialize method. --- app/services/prometheus/proxy_service.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/services/prometheus/proxy_service.rb b/app/services/prometheus/proxy_service.rb index 6dc68e378fd..d6fe20d377e 100644 --- a/app/services/prometheus/proxy_service.rb +++ b/app/services/prometheus/proxy_service.rb @@ -55,8 +55,6 @@ module Prometheus end def calculate_reactive_cache(prometheus_owner_class_name, prometheus_owner_id, method, path, params) - @prometheus_owner = prometheus_owner_from_class(prometheus_owner_class_name, prometheus_owner_id) - return cannot_proxy_response unless can_proxy?(method, path) return no_prometheus_response unless can_query? @@ -82,10 +80,6 @@ module Prometheus error('Proxy support for this API is not available currently') end - def prometheus_owner_from_class(prometheus_owner_class_name, prometheus_owner_id) - Kernel.const_get(prometheus_owner_class_name).find(prometheus_owner_id) - end - def prometheus_adapter @prometheus_adapter ||= @prometheus_owner.prometheus_adapter end -- cgit v1.2.1