Skip to content

Instantly share code, notes, and snippets.

loged on

Dan Nolan dannolan

loged on
View GitHub Profile
mloughran / pubsub_example.rb
Created Sep 14, 2011
em-hiredis pubsub example
View pubsub_example.rb
require 'em-hiredis' {
require 'em-hiredis'
redis = EM::Hiredis.connect
# If you pass a block to subscribe it will be called whenever a message
# is received on this channel
redis.pubsub.subscribe('foo') { |msg|
p [:received_foo, msg]
You can’t perform that action at this time.