Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9c2761ccdc
Fetching contributors…

Cannot retrieve contributors at this time

file 21 lines (17 sloc) 0.509 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
require 'rubygems'
require 'raad'
require 'redis'

class RedisQueueSubscriber1

  def initialize
    @redis_options = {:host => 'localhost', :port => 6379}
    @queue = 'test_queue'
    @redis = Redis.new(@redis_options)
  end

  def start
    Raad::Logger.info("starting RedisQueueSubscriber1 using #{@redis_options.inspect}")
    while !Raad.stopped?
      result = @redis.blpop(@queue, timeout = 0)
      Raad::Logger.debug("RedisQueueSubscriber1 received=#{result.inspect}") if result
    end
  end

end
Something went wrong with that request. Please try again.