mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-10 01:31:45 +00:00
20 lines
417 B
Ruby
20 lines
417 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module SidekiqMiddleware
|
|
module Identity
|
|
class Passthrough
|
|
include Sidekiq::ClientMiddleware
|
|
|
|
def call(_worker_class, job, _queue, _redis_pool)
|
|
::Gitlab::Auth::Identity.currently_linked do |identity|
|
|
identity.sidekiq_link!(job) if identity.composite?
|
|
end
|
|
|
|
yield
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|