Commit 5f2dc999 authored by Pawel Chojnacki's avatar Pawel Chojnacki
Browse files

use proper `if defined?` check.

parent 453033351ac9
......@@ -6,12 +6,15 @@ module Prometheus
include Gitlab::CurrentSettings
def metrics_folder_present?
ENV.has_key?('prometheus_multiproc_dir') && ::Dir.exist?(ENV['prometheus_multiproc_dir']) &&
ENV.has_key?('prometheus_multiproc_dir') &&
::Dir.exist?(ENV['prometheus_multiproc_dir']) &&
def prometheus_metrics_enabled?
@prometheus_metrics_enabled ||= prometheus_metrics_enabled_unmemoized
return @prometheus_metrics_enabled if defined?(@prometheus_metrics_enabled)
@prometheus_metrics_enabled = prometheus_metrics_enabled_unmemoized
def registry
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment