debian-mirror-gitlab/lib/gitlab/sidekiq_middleware/worker_context.rb
2020-03-13 15:44:24 +05:30

15 lines
278 B
Ruby

# frozen_string_literal: true
module Gitlab
module SidekiqMiddleware
module WorkerContext
private
def wrap_in_optional_context(context_or_nil, &block)
return yield unless context_or_nil
context_or_nil.use(&block)
end
end
end
end