Sha256: ebcdc2b4620cabab006eacbdf95cb4456e0a837427f485c70044503ae596c63c

Contents?: true

Size: 474 Bytes

Versions: 11

Compression:

Stored size: 474 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] a connection to redis
    def redis(_r_pool = nil, &block)
      Sidekiq.redis do |conn|
        conn.with(&block)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-8.0.10 lib/sidekiq_unique_jobs/connection.rb
sidekiq-unique-jobs-8.0.9 lib/sidekiq_unique_jobs/connection.rb
sidekiq-unique-jobs-8.0.8 lib/sidekiq_unique_jobs/connection.rb
sidekiq-unique-jobs-8.0.7 lib/sidekiq_unique_jobs/connection.rb
sidekiq-unique-jobs-8.0.6 lib/sidekiq_unique_jobs/connection.rb
sidekiq-unique-jobs-8.0.5 lib/sidekiq_unique_jobs/connection.rb
sidekiq-unique-jobs-8.0.4 lib/sidekiq_unique_jobs/connection.rb
sidekiq-unique-jobs-8.0.3 lib/sidekiq_unique_jobs/connection.rb
sidekiq-unique-jobs-8.0.2 lib/sidekiq_unique_jobs/connection.rb
sidekiq-unique-jobs-8.0.1 lib/sidekiq_unique_jobs/connection.rb
sidekiq-unique-jobs-8.0.0 lib/sidekiq_unique_jobs/connection.rb