module SongkickQueue

Constants

Configuration
TooManyReconnectAttemptsError
VERSION

Public Class Methods

configuration() click to toggle source

Retrieve configuration for SongkickQueue

@return [Configuration]

# 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.requeue_rejected_messages = false
    config.heartbeat_interval = 10
  end
end
configure() { |configuration| ... } click to toggle source

Yields a block, passing the memoized configuration instance

@yield [Configuration]

# File lib/songkick_queue.rb, line 48
def self.configure
  yield(configuration)

  configuration
end
publish(queue_name, message, options = {}) click to toggle source

Publishes the given message to the given queue

@see SongkickQueue::Producer#publish for argument documentation

# File lib/songkick_queue.rb, line 57
def self.publish(queue_name, message, options = {})
  producer.publish(queue_name, message, options = {})
end

Private Class Methods

producer() click to toggle source
# File lib/songkick_queue.rb, line 63
def self.producer
  @producer ||= Producer.new
end