mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Renamed redis_connection to redis_pool.
This commit is contained in:
parent
5e2b691ac8
commit
c8b5d841db
2 changed files with 5 additions and 5 deletions
|
@ -66,10 +66,10 @@ module Sidekiq
|
||||||
|
|
||||||
def self.redis(&block)
|
def self.redis(&block)
|
||||||
raise ArgumentError, "requires a block" if !block
|
raise ArgumentError, "requires a block" if !block
|
||||||
redis_connection.with(&block)
|
redis_pool.with(&block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.redis_connection
|
def self.redis_pool
|
||||||
@redis ||= Sidekiq::RedisConnection.create
|
@redis ||= Sidekiq::RedisConnection.create
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ module Sidekiq
|
||||||
@chain
|
@chain
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize(redis_connection = Sidekiq.redis_connection)
|
def initialize(redis_pool = Sidekiq.redis_pool)
|
||||||
@redis_connection = redis_connection
|
@redis_pool = redis_pool
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -139,7 +139,7 @@ module Sidekiq
|
||||||
|
|
||||||
def raw_push(payloads)
|
def raw_push(payloads)
|
||||||
pushed = false
|
pushed = false
|
||||||
@redis_connection.with do |conn|
|
@redis_pool.with do |conn|
|
||||||
if payloads.first['at']
|
if payloads.first['at']
|
||||||
pushed = conn.zadd('schedule', payloads.map do |hash|
|
pushed = conn.zadd('schedule', payloads.map do |hash|
|
||||||
at = hash.delete('at').to_s
|
at = hash.delete('at').to_s
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue