gitlab-org--gitlab-foss/lib/gitlab/sidekiq_versioning/middleware.rb

13 lines
250 B
Ruby

# frozen_string_literal: true
module Gitlab
module SidekiqVersioning
class Middleware
def call(worker, job, queue)
worker.job_version = job['version'] if worker.is_a?(ApplicationWorker)
yield
end
end
end
end