From e8d2c2579383897a1dd7f9debd359abe8ae8373d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 20 Jul 2021 09:55:51 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-1-stable-ee --- .../concerns/gitlab/github_import/object_importer.rb | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'app/workers/concerns/gitlab') diff --git a/app/workers/concerns/gitlab/github_import/object_importer.rb b/app/workers/concerns/gitlab/github_import/object_importer.rb index 6ebf7c7c263..1eff53cea01 100644 --- a/app/workers/concerns/gitlab/github_import/object_importer.rb +++ b/app/workers/concerns/gitlab/github_import/object_importer.rb @@ -36,14 +36,15 @@ module Gitlab importer_class.new(object, project, client).execute - counter.increment + Gitlab::GithubImport::ObjectCounter.increment(project, object_type, :imported) + info(project.id, message: 'importer finished') rescue StandardError => e error(project.id, e, hash) end - def counter - @counter ||= Gitlab::Metrics.counter(counter_name, counter_description) + def object_type + raise NotImplementedError end # Returns the representation class to use for the object. This class must @@ -57,16 +58,6 @@ module Gitlab raise NotImplementedError end - # Returns the name (as a Symbol) of the Prometheus counter. - def counter_name - raise NotImplementedError - end - - # Returns the description (as a String) of the Prometheus counter. - def counter_description - raise NotImplementedError - end - private attr_accessor :github_id -- cgit v1.2.3