diff options
Diffstat (limited to 'lib/gitlab/sidekiq_middleware/worker_context')
-rw-r--r-- | lib/gitlab/sidekiq_middleware/worker_context/server.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/sidekiq_middleware/worker_context/server.rb b/lib/gitlab/sidekiq_middleware/worker_context/server.rb index d2d84742c17..2d8fd8002d2 100644 --- a/lib/gitlab/sidekiq_middleware/worker_context/server.rb +++ b/lib/gitlab/sidekiq_middleware/worker_context/server.rb @@ -12,8 +12,10 @@ module Gitlab # This is not a worker we know about, perhaps from a gem return yield unless worker_class.respond_to?(:get_worker_context) - # Use the context defined on the class level as a base context - wrap_in_optional_context(worker_class.get_worker_context, &block) + Gitlab::ApplicationContext.with_context(feature_category: worker_class.get_feature_category.to_s) do + # Use the context defined on the class level as the more specific context + wrap_in_optional_context(worker_class.get_worker_context, &block) + end end end end |