Skip to content

Instantly share code, notes, and snippets.

@octplane
Created October 20, 2010 14:42
Show Gist options
  • Save octplane/636545 to your computer and use it in GitHub Desktop.
Save octplane/636545 to your computer and use it in GitHub Desktop.
Test case for /redis-rb/issues#issue/63
#!/usr/bin/env ruby
require 'rubygems'
require 'redis'
class Subscriber
def initialize
end
def redis
Redis.new(:host => "redis.fotonauts.net", :port => 12430)
end
def wait
redis.subscribe('frontline') do |on|
on.subscribe do |queue, message|
puts "Ready to process"
end
on.message do |queue, message|
end
end
end
end
if __FILE__==$0
g= Subscriber.new
g.wait
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment