mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-08-03 16:37:48 +00:00
16 lines
370 B
Ruby
16 lines
370 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module SidekiqMiddleware
|
|
class SetIpAddress
|
|
def call(_worker_class, job, _queue)
|
|
return yield unless job.key?('ip_address_state')
|
|
|
|
::Gitlab::IpAddressState.with(job['ip_address_state']) do # rubocop: disable CodeReuse/ActiveRecord -- Non-AR
|
|
yield
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|