1
0
Fork 0
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:
Jonathan Hyman 2014-03-24 13:56:31 -04:00
parent 5e2b691ac8
commit c8b5d841db
2 changed files with 5 additions and 5 deletions

View file

@ -66,10 +66,10 @@ module Sidekiq
def self.redis(&block)
raise ArgumentError, "requires a block" if !block
redis_connection.with(&block)
redis_pool.with(&block)
end
def self.redis_connection
def self.redis_pool
@redis ||= Sidekiq::RedisConnection.create
end

View file

@ -25,8 +25,8 @@ module Sidekiq
@chain
end
def initialize(redis_connection = Sidekiq.redis_connection)
@redis_connection = redis_connection
def initialize(redis_pool = Sidekiq.redis_pool)
@redis_pool = redis_pool
end
##
@ -139,7 +139,7 @@ module Sidekiq
def raw_push(payloads)
pushed = false
@redis_connection.with do |conn|
@redis_pool.with do |conn|
if payloads.first['at']
pushed = conn.zadd('schedule', payloads.map do |hash|
at = hash.delete('at').to_s