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/github_import/parallel_scheduling.rb')
-rw-r--r--lib/gitlab/github_import/parallel_scheduling.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/github_import/parallel_scheduling.rb b/lib/gitlab/github_import/parallel_scheduling.rb
index 92f9e8a646d..4598429d568 100644
--- a/lib/gitlab/github_import/parallel_scheduling.rb
+++ b/lib/gitlab/github_import/parallel_scheduling.rb
@@ -103,6 +103,8 @@ module Gitlab
page.objects.each do |object|
next if already_imported?(object)
+ Gitlab::GithubImport::ObjectCounter.increment(project, object_type, :fetched)
+
yield object
# We mark the object as imported immediately so we don't end up
@@ -129,6 +131,10 @@ module Gitlab
Gitlab::Cache::Import::Caching.set_add(already_imported_cache_key, id)
end
+ def object_type
+ raise NotImplementedError
+ end
+
# Returns the ID to use for the cache used for checking if an object has
# already been imported or not.
#