Sha256: 2d382dbb48750ea1165da7cc093889c22b57ec10ff9a7856a2c5ed02b3dbaafe
Contents?: true
Size: 578 Bytes
Versions: 24
Compression:
Stored size: 578 Bytes
Contents
# frozen_string_literal: true module SidekiqUniqueJobs # Shared module for dealing with redis connections # # @author Mikael Henriksson <mikael@zoolutions.se> module Connection def self.included(base) base.send(:extend, self) end # Creates a connection to redis # @return [Sidekiq::RedisConnection, ConnectionPool] a connection to redis def redis(r_pool = nil, &block) r_pool ||= defined?(redis_pool) ? redis_pool : r_pool if r_pool r_pool.with(&block) else Sidekiq.redis(&block) end end end end
Version data entries
24 entries across 24 versions & 1 rubygems