diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-23 18:10:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-23 18:10:47 +0300 |
commit | 5ff5047fdc2c614f347de5c388424b50a5460165 (patch) | |
tree | 4c6ca5c4cb1e822e4ac213b44b1334000c00fa7d /app/workers | |
parent | 6cbe9eaeb3b69ff378e23eec3a5f33caf92b6d16 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/all_queues.yml | 8 | ||||
-rw-r--r-- | app/workers/namespaces/onboarding_progress_worker.rb | 20 |
2 files changed, 28 insertions, 0 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 3b455b972f9..bded69e7f47 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -1848,6 +1848,14 @@ :weight: 1 :idempotent: true :tags: [] +- :name: namespaces_onboarding_progress + :feature_category: :product_analytics + :has_external_dependencies: + :urgency: :low + :resource_boundary: :unknown + :weight: 1 + :idempotent: true + :tags: [] - :name: namespaces_onboarding_user_added :feature_category: :users :has_external_dependencies: diff --git a/app/workers/namespaces/onboarding_progress_worker.rb b/app/workers/namespaces/onboarding_progress_worker.rb new file mode 100644 index 00000000000..9cb5a23cf31 --- /dev/null +++ b/app/workers/namespaces/onboarding_progress_worker.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Namespaces + class OnboardingProgressWorker + include ApplicationWorker + + feature_category :product_analytics + urgency :low + + deduplicate :until_executed + idempotent! + + def perform(namespace_id, action) + namespace = Namespace.find_by_id(namespace_id) + return unless namespace && action + + OnboardingProgressService.new(namespace).execute(action: action.to_sym) + end + end +end |