diff options
author | rpereira2 <rpereira@gitlab.com> | 2019-04-02 19:18:26 +0530 |
---|---|---|
committer | Peter Leitzen <pleitzen@gitlab.com> | 2019-04-04 22:22:44 +0200 |
commit | 5910f7600459cf1167492617c3e001c80c90c941 (patch) | |
tree | e7c20a06f344e637857b6fa6cb9e5a0ac0524be2 | |
parent | 399173d6fad09b8a6334d38c3b8412617fe1dd9a (diff) | |
download | gitlab-ce-5910f7600459cf1167492617c3e001c80c90c941.tar.gz |
Remove unnecessary line
- calculate_reactive_cache does not need to initialize @prometheus_owner
again. It's already being initialized in the initialize method.
-rw-r--r-- | app/services/prometheus/proxy_service.rb | 6 |
1 files changed, 0 insertions, 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 |