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.5.0"
Class Method Summary collapse
-
.configuration ⇒ Configuration
Retrieve configuration for SongkickQueue.
-
.configure {|Configuration| ... } ⇒ Object
Yields a block, passing the memoized configuration instance.
- .producer ⇒ Object
-
.publish(queue_name, message, options = {}) ⇒ Object
Publishes the given message to the given queue.
Class Method Details
.configuration ⇒ Configuration
Retrieve configuration for SongkickQueue
30 31 32 33 34 35 36 37 |
# File 'lib/songkick_queue.rb', line 30 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
42 43 44 45 46 |
# File 'lib/songkick_queue.rb', line 42 def self.configure yield(configuration) configuration end |
.producer ⇒ Object
57 58 59 |
# File 'lib/songkick_queue.rb', line 57 def self.producer @producer ||= Producer.new end |
.publish(queue_name, message, options = {}) ⇒ Object
Publishes the given message to the given queue
51 52 53 |
# File 'lib/songkick_queue.rb', line 51 def self.publish(queue_name, , = {}) producer.publish(queue_name, , = {}) end |