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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-21 03:09:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-21 03:09:28 +0300
commitb1031060f00cdb201cf8d790c6ec6421860c30f3 (patch)
tree44b572f9df4a5696d4378bc7848f19ac79e02cbd /lib/gitlab/sidekiq_config
parentcfd505b1984183857fcfeab259c5a38791205914 (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.rb15
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]