diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-20 03:12:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-20 03:12:57 +0300 |
commit | 8277a5b4ba05fe11174397c689c66cef5c06fc38 (patch) | |
tree | c4abbec1509476efbb14c040045ca163042de3bf /app/workers | |
parent | f46a8dbf1a0999e27dfeddd258096ef97def8d64 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/all_queues.yml | 9 | ||||
-rw-r--r-- | app/workers/packages/npm/deprecate_package_worker.rb | 22 |
2 files changed, 31 insertions, 0 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 0418bef3c1c..f47d5da95f0 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -1758,6 +1758,15 @@ :weight: 1 :idempotent: true :tags: [] +- :name: package_repositories:packages_npm_deprecate_package + :worker_name: Packages::Npm::DeprecatePackageWorker + :feature_category: :package_registry + :has_external_dependencies: false + :urgency: :low + :resource_boundary: :unknown + :weight: 1 + :idempotent: true + :tags: [] - :name: package_repositories:packages_nuget_extraction :worker_name: Packages::Nuget::ExtractionWorker :feature_category: :package_registry diff --git a/app/workers/packages/npm/deprecate_package_worker.rb b/app/workers/packages/npm/deprecate_package_worker.rb new file mode 100644 index 00000000000..1fd324b89c3 --- /dev/null +++ b/app/workers/packages/npm/deprecate_package_worker.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Packages + module Npm + class DeprecatePackageWorker + include ApplicationWorker + + data_consistency :sticky + queue_namespace :package_repositories + feature_category :package_registry + deduplicate :until_executed + urgency :low + idempotent! + + def perform(project_id, params) + project = Project.find(project_id) + + ::Packages::Npm::DeprecatePackageService.new(project, params).execute + end + end + end +end |