Sha256: 6513953167d259fbc8d579af2deac932d573d95453926e1e0e6c19b4c0107e3f
Contents?: true
Size: 620 Bytes
Versions: 9
Compression:
Stored size: 620 Bytes
Contents
# frozen_string_literal: true module Labkit module Middleware module Sidekiq module Context # This middleware for Sidekiq-client uses the values stored on a job to # reinstantiate a context in which the job will run. class Server def call(_worker_class, job, _queue) worker_name = (job["wrapped"].presence || job["class"]).to_s data = job.merge(Labkit::Context.log_key(:caller_id) => worker_name) Labkit::Context.with_context(data) do |_context| yield end end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems