module Sidekiq::RedisConnection

def wrap(pwd)

Wrap hard-coded passwords in a Proc to avoid logging the value
def wrap(pwd)
  if pwd.is_a?(String)
    ->(username) { pwd }
  else
    pwd
  end
end