lib/insque.rb in insque-0.3.4 vs lib/insque.rb in insque-0.3.5
- old
+ new
@@ -36,11 +36,11 @@
keys.each {|k| r.lpush k, value.to_json}
end
end
def self.listen worker_name=''
- redis = Redis.new redis
+ redis = Redis.new @redis_config
redis.select 7
redis.sadd 'insque_inboxes', @inbox
log "#{worker_name} START LISTENING #{@inbox}"
loop do
@@ -57,10 +57,10 @@
redis.lrem @processing, 0, message
end
end
def self.janitor
- redis = Redis.new redis
+ redis = Redis.new @redis_config
redis.select 7
loop do
redis.watch @processing
errors = []