Sha256: b7d0da9c338f31aa8add037809970d618abf8970736ab4513fd217e49dbf3dc5
Contents?: true
Size: 454 Bytes
Versions: 22
Compression:
Stored size: 454 Bytes
Contents
module Propono class QueueCreatorError < ProponoError end class QueueCreator include Sqs def self.find_or_create(name) new(name).find_or_create end def initialize(name) @name = name end def find_or_create result = sqs.create_queue(@name) body = result.body url = body.fetch('QueueUrl') { raise QueueCreatorError.new("No QueueUrl returned from SQS") } Queue.new(url) end end end
Version data entries
22 entries across 22 versions & 1 rubygems
Version | Path |
---|---|
propono-0.6.1 | lib/propono/services/queue_creator.rb |
propono-0.6.0 | lib/propono/services/queue_creator.rb |