Module: SongkickQueue
- Defined in:
- lib/songkick_queue.rb,
lib/songkick_queue/cli.rb,
lib/songkick_queue/client.rb,
lib/songkick_queue/worker.rb,
lib/songkick_queue/version.rb,
lib/songkick_queue/consumer.rb,
lib/songkick_queue/producer.rb
Defined Under Namespace
Modules: Consumer Classes: CLI, Client, Configuration, Producer, Worker
Constant Summary collapse
- TooManyReconnectAttemptsError =
Class.new(StandardError)
- VERSION =
"0.6.0"
Class Method Summary collapse
-
.configuration ⇒ Configuration
Retrieve configuration for SongkickQueue.
-
.configure {|Configuration| ... } ⇒ Object
Yields a block, passing the memoized configuration instance.
-
.publish(queue_name, message, options = {}) ⇒ Object
Publishes the given message to the given queue.
Class Method Details
.configuration ⇒ Configuration
Retrieve configuration for SongkickQueue
32 33 34 35 36 37 38 39 |
# File 'lib/songkick_queue.rb', line 32 def self.configuration @configuration ||= Configuration.new.tap do |config| config.logger = Logger.new(STDOUT) config.port = 5672 config.max_reconnect_attempts = 10 config.network_recovery_interval = 1.0 end end |
.configure {|Configuration| ... } ⇒ Object
Yields a block, passing the memoized configuration instance
44 45 46 47 48 |
# File 'lib/songkick_queue.rb', line 44 def self.configure yield(configuration) configuration end |
.publish(queue_name, message, options = {}) ⇒ Object
Publishes the given message to the given queue
53 54 55 |
# File 'lib/songkick_queue.rb', line 53 def self.publish(queue_name, , = {}) producer.publish(queue_name, , = {}) end |