Welcome to mirror list, hosted at ThFree Co, Russian Federation.

correlation_injector.rb « sidekiq_middleware « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b807b3a03edba885320a1f6560e4b813ea3b3014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module Gitlab
  module SidekiqMiddleware
    class CorrelationInjector
      def call(worker_class, job, queue, redis_pool)
        job[Gitlab::CorrelationId::LOG_KEY] ||=
          Gitlab::CorrelationId.current_or_new_id

        yield
      end
    end
  end
end