examples/consumer.rb in songkick_queue-0.5.0 vs examples/consumer.rb in songkick_queue-0.6.0
- old
+ new
@@ -8,9 +8,14 @@
SongkickQueue.configure do |config|
config.host = 'localhost'
config.logger = Logger.new(STDOUT)
end
+ActiveSupport::Notifications.subscribe('consume_message.songkick_queue') do |*args|
+ event = ActiveSupport::Notifications::Event.new(*args)
+ SongkickQueue.configuration.logger.info "name: #{event.name}, duration: #{event.duration}, payload: #{event.payload}"
+end
+
class TweetConsumer
include SongkickQueue::Consumer
consume_from_queue 'notifications-service.tweets'