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 =
"1.1.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
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/songkick_queue.rb', line 34 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 config. = false config.heartbeat_interval = 10 end end |
.configure {|Configuration| ... } ⇒ Object
Yields a block, passing the memoized configuration instance
48 49 50 51 52 |
# File 'lib/songkick_queue.rb', line 48 def self.configure yield(configuration) configuration end |
.publish(queue_name, message, options = {}) ⇒ Object
Publishes the given message to the given queue
57 58 59 |
# File 'lib/songkick_queue.rb', line 57 def self.publish(queue_name, , = {}) producer.publish(queue_name, , = {}) end |