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

ConfigurationError =
Class.new(StandardError)
VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.configurationConfiguration

Retrieve configuration for SongkickQueue

Returns:



18
19
20
# File 'lib/songkick_queue.rb', line 18

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|Configuration| ... } ⇒ Object

Yields a block, passing the memoized configuration instance

Yields:



25
26
27
# File 'lib/songkick_queue.rb', line 25

def self.configure
  yield(configuration)
end

.publish(queue_name, message) ⇒ Object

Publishes the given message to the given queue

Parameters:

  • queue_name (String)

    to publish to

  • message (#to_json)

    to serialize and enqueue



33
34
35
# File 'lib/songkick_queue.rb', line 33

def self.publish(queue_name, message)
  producer.publish(queue_name, message)
end