diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-09 00:15:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-09 00:15:10 +0300 |
commit | 7db94a9807df03ce7a4f210b513816a47f34e15b (patch) | |
tree | a20574d4297ba13e3340bfae217e3035e77d6423 /app/workers | |
parent | 3a563d7c1e15023f205d2a357e5d8a38a3b53ecc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
4 files changed, 38 insertions, 2 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 29585f5539a..0efcecae299 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -1263,6 +1263,15 @@ :weight: 1 :idempotent: false :tags: [] +- :name: github_importer:github_import_pull_requests_import_review + :worker_name: Gitlab::GithubImport::PullRequests::ImportReviewWorker + :feature_category: :importers + :has_external_dependencies: true + :urgency: :low + :resource_boundary: :cpu + :weight: 1 + :idempotent: false + :tags: [] - :name: github_importer:github_import_pull_requests_import_review_request :worker_name: Gitlab::GithubImport::PullRequests::ImportReviewRequestWorker :feature_category: :importers diff --git a/app/workers/gitlab/github_import/import_pull_request_review_worker.rb b/app/workers/gitlab/github_import/import_pull_request_review_worker.rb index 8d5c7b95b10..6b7d19010ec 100644 --- a/app/workers/gitlab/github_import/import_pull_request_review_worker.rb +++ b/app/workers/gitlab/github_import/import_pull_request_review_worker.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +# TODO: remove in 16.1 milestone +# https://gitlab.com/gitlab-org/gitlab/-/issues/409706 module Gitlab module GithubImport class ImportPullRequestReviewWorker # rubocop:disable Scalability/IdempotentWorker @@ -12,7 +14,7 @@ module Gitlab end def importer_class - Importer::PullRequestReviewImporter + Importer::PullRequests::ReviewImporter end def object_type diff --git a/app/workers/gitlab/github_import/pull_requests/import_review_worker.rb b/app/workers/gitlab/github_import/pull_requests/import_review_worker.rb new file mode 100644 index 00000000000..97521d629f9 --- /dev/null +++ b/app/workers/gitlab/github_import/pull_requests/import_review_worker.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module Gitlab + module GithubImport + module PullRequests + class ImportReviewWorker # rubocop:disable Scalability/IdempotentWorker + include ObjectImporter + + worker_resource_boundary :cpu + + def representation_class + Gitlab::GithubImport::Representation::PullRequestReview + end + + def importer_class + Importer::PullRequests::ReviewImporter + end + + def object_type + :pull_request_review + end + end + end + end +end diff --git a/app/workers/gitlab/github_import/stage/import_pull_requests_reviews_worker.rb b/app/workers/gitlab/github_import/stage/import_pull_requests_reviews_worker.rb index e10f1170618..33dee47bd03 100644 --- a/app/workers/gitlab/github_import/stage/import_pull_requests_reviews_worker.rb +++ b/app/workers/gitlab/github_import/stage/import_pull_requests_reviews_worker.rb @@ -15,7 +15,7 @@ module Gitlab # client - An instance of Gitlab::GithubImport::Client. # project - An instance of Project. def import(client, project) - waiter = Importer::PullRequestsReviewsImporter + waiter = Importer::PullRequests::ReviewsImporter .new(project, client) .execute |