module SidekiqUniqueJobs

def use_config(tmp_config = {})

Other tags:
    Yield: - control to the caller

Returns:
  • (void) -

Parameters:
  • tmp_config (Hash) -- the temporary configuration to use
def use_config(tmp_config = {})
  raise ::ArgumentError, "#{name}.#{__method__} needs a block" unless block_given?
  old_config = config.to_h
  reset!
  configure(tmp_config)
  yield
ensure
  reset!
  configure(old_config.to_h)
end