diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-21 03:09:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-21 03:09:28 +0300 |
commit | b1031060f00cdb201cf8d790c6ec6421860c30f3 (patch) | |
tree | 44b572f9df4a5696d4378bc7848f19ac79e02cbd /lib/gitlab/sidekiq_config | |
parent | cfd505b1984183857fcfeab259c5a38791205914 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/sidekiq_config')
-rw-r--r-- | lib/gitlab/sidekiq_config/dummy_worker.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/gitlab/sidekiq_config/dummy_worker.rb b/lib/gitlab/sidekiq_config/dummy_worker.rb index b7f53da8e00..49696e913cf 100644 --- a/lib/gitlab/sidekiq_config/dummy_worker.rb +++ b/lib/gitlab/sidekiq_config/dummy_worker.rb @@ -6,7 +6,6 @@ module Gitlab class DummyWorker ATTRIBUTE_METHODS = { name: :name, - feature_category: :get_feature_category, has_external_dependencies: :worker_has_external_dependencies?, urgency: :get_urgency, resource_boundary: :get_worker_resource_boundary, @@ -27,6 +26,20 @@ module Gitlab nil end + # All dummy workers are unowned; get the feature category from the + # context if available. + def get_feature_category + Gitlab::ApplicationContext.current_context_attribute('meta.feature_category') || :not_owned + end + + def get_worker_context + nil + end + + def context_for_arguments(*) + nil + end + ATTRIBUTE_METHODS.each do |attribute, meth| define_method meth do @attributes[attribute] |