module Sidekiq::Context

def self.add(k, v)

def self.add(k, v)
  current[k] = v
end

def self.current

def self.current
  Thread.current[:sidekiq_context] ||= {}
end

def self.with(hash)

def self.with(hash)
  orig_context = current.dup
  current.merge!(hash)
  yield
ensure
  Thread.current[:sidekiq_context] = orig_context
end