From b99cf2024d1b518d876bc4f1f4aac8549b4dd993 Mon Sep 17 00:00:00 2001 From: rpereira2 Date: Mon, 26 Aug 2019 12:41:25 +0530 Subject: Add nil check for Gitlab.config.prometheus --- .../database_importers/self_monitoring/project/create_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/gitlab/database_importers/self_monitoring/project/create_service.rb b/lib/gitlab/database_importers/self_monitoring/project/create_service.rb index 164854e1e1a..6badacc2fc9 100644 --- a/lib/gitlab/database_importers/self_monitoring/project/create_service.rb +++ b/lib/gitlab/database_importers/self_monitoring/project/create_service.rb @@ -175,7 +175,7 @@ module Gitlab end def prometheus_enabled? - Gitlab.config.prometheus.enable + Gitlab.config.prometheus.enable if Gitlab.config.prometheus rescue Settingslogic::MissingSetting log_error(_('prometheus.enable is not present in gitlab.yml')) @@ -183,7 +183,7 @@ module Gitlab end def prometheus_listen_address - Gitlab.config.prometheus.listen_address + Gitlab.config.prometheus.listen_address if Gitlab.config.prometheus rescue Settingslogic::MissingSetting log_error(_('prometheus.listen_address is not present in gitlab.yml')) -- cgit v1.2.1