Sha256: 09daa9019ff606839041e91bf87e5d9c5fb76e7d33a8e141e6e3669e7e93568d
Contents?: true
Size: 578 Bytes
Versions: 50
Compression:
Stored size: 578 Bytes
Contents
# frozen_string_literal: true module SidekiqUniqueJobs # Shared module for dealing with redis connections # # @author Mikael Henriksson <mikael@mhenrixon.com> 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
50 entries across 50 versions & 1 rubygems