Module: Resque::Plugins::Pubsub::Publisher::InstanceMethods
- Defined in:
- lib/resque/plugins/pubsub/publisher.rb
Instance Method Summary collapse
Instance Method Details
#publish(topic, message) ⇒ Object
12 13 14 15 16 |
# File 'lib/resque/plugins/pubsub/publisher.rb', line 12 def publish(topic, ) puts "[#{self.class.to_s}] publishing #{} in #{topic}" Exchange.redis.sadd(:queues, 'messages') Exchange.redis.rpush('queue:messages', { :class => 'Resque::Plugins::Pubsub::Broker', :args => [topic, ] }.to_json) end |