lib/qs/client.rb in qs-0.6.1 vs lib/qs/client.rb in qs-0.7.0

- old
+ new

@@ -23,14 +23,14 @@ end end module InstanceMethods - attr_reader :redis_config, :redis + attr_reader :redis_connect_hash, :redis - def initialize(redis_config) - @redis_config = redis_config + def initialize(redis_connect_hash) + @redis_connect_hash = redis_connect_hash end def enqueue(queue, job_name, job_params = nil) job = Qs::Job.new(job_name, :params => job_params) enqueue!(queue, job) @@ -117,11 +117,11 @@ class QsClient include Client def initialize(*args) super - @redis = HellaRedis::Connection.new(self.redis_config) + @redis = HellaRedis::Connection.new(self.redis_connect_hash) end def push(queue_name, payload_hash) queue_redis_key = Queue::RedisKey.new(queue_name) encoded_payload = Qs.encode(payload_hash) @@ -143,10 +143,10 @@ attr_reader :pushed_items def initialize(*args) super require 'hella-redis/connection_spy' - @redis = HellaRedis::ConnectionSpy.new(self.redis_config) + @redis = HellaRedis::ConnectionSpy.new(self.redis_connect_hash) @pushed_items = [] end def push(queue_name, payload_hash) # attempt to encode (and then throw away) the payload hash, this will