Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/metrics/dashboard/project_dashboard_service.rb')
-rw-r--r--lib/gitlab/metrics/dashboard/project_dashboard_service.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/gitlab/metrics/dashboard/project_dashboard_service.rb b/lib/gitlab/metrics/dashboard/project_dashboard_service.rb
index fdffd067c93..e88658e4f9f 100644
--- a/lib/gitlab/metrics/dashboard/project_dashboard_service.rb
+++ b/lib/gitlab/metrics/dashboard/project_dashboard_service.rb
@@ -13,20 +13,12 @@ module Gitlab
def all_dashboard_paths(project)
file_finder(project)
.list_files_for(DASHBOARD_ROOT)
- .map do |filepath|
- Rails.cache.delete(cache_key(project.id, filepath))
-
- { path: filepath, default: false }
- end
+ .map { |filepath| { path: filepath, default: false } }
end
def file_finder(project)
Gitlab::Template::Finders::RepoTemplateFinder.new(project, DASHBOARD_ROOT, '.yml')
end
-
- def cache_key(id, dashboard_path)
- "project_#{id}_metrics_dashboard_#{dashboard_path}"
- end
end
private
@@ -39,7 +31,7 @@ module Gitlab
end
def cache_key
- self.class.cache_key(project.id, dashboard_path)
+ "project_#{project.id}_metrics_dashboard_#{dashboard_path}"
end
end
end