Sha256: 462b6c53f21f91db95a71e7a7df1c7dac2968a322eecd6c605bc51f571ac12b9
Contents?: true
Size: 605 Bytes
Versions: 1
Compression:
Stored size: 605 Bytes
Contents
# Example environment file # Require this file when running `songkick_queue` like so: # # $ bin/songkick_queue --require ./examples/environment.rb --consumer TweetConsumer # require_relative '../lib/songkick_queue' SongkickQueue.configure do |config| config.host = 'localhost' config.logger = Logger.new(STDOUT) end class TweetConsumer include SongkickQueue::Consumer consume_from_queue 'notifications-service.tweets' def process(payload) puts "TweetConsumer#process(#{payload})" 10.times do sleep 1 puts "Processing..." end puts "Done processing!" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
songkick_queue-0.4.0 | examples/environment.rb |