Module: SidekiqUniqueJobs::Connection
- Included in:
- SidekiqUniqueJobs, BatchDelete, Lock, Locksmith, Orphans::Reaper, UpgradeLocks
- Defined in:
- lib/sidekiq_unique_jobs/connection.rb
Overview
Shared module for dealing with redis connections
Class Method Summary collapse
Instance Method Summary collapse
-
#redis(_r_pool = nil, &block) ⇒ Sidekiq::RedisConnection
Creates a connection to redis.
Class Method Details
.included(base) ⇒ Object
8 9 10 |
# File 'lib/sidekiq_unique_jobs/connection.rb', line 8 def self.included(base) base.send(:extend, self) end |
Instance Method Details
#redis(_r_pool = nil, &block) ⇒ Sidekiq::RedisConnection
Creates a connection to redis
14 15 16 17 18 |
# File 'lib/sidekiq_unique_jobs/connection.rb', line 14 def redis(_r_pool = nil, &block) Sidekiq.redis do |conn| conn.with(&block) end end |