Class: Requeus::Adapter::SQS
- Inherits:
-
Object
- Object
- Requeus::Adapter::SQS
- Defined in:
- lib/requeus/adapter/sqs.rb
Instance Method Summary collapse
- #confirm(queue, handle) ⇒ Object
- #get(queue, limit = 1) ⇒ Object
-
#initialize(options = {}) ⇒ SQS
constructor
A new instance of SQS.
- #put(queue, request) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ SQS
Returns a new instance of SQS.
4 5 6 |
# File 'lib/requeus/adapter/sqs.rb', line 4 def initialize = {} @options = end |
Instance Method Details
#confirm(queue, handle) ⇒ Object
18 19 20 |
# File 'lib/requeus/adapter/sqs.rb', line 18 def confirm queue, handle connection.interface.(connection.interface.queue_url_by_name(queue), handle) end |
#get(queue, limit = 1) ⇒ Object
12 13 14 15 16 |
# File 'lib/requeus/adapter/sqs.rb', line 12 def get queue, limit = 1 get_queue(queue).(limit).map do || [.receipt_handle, .body] end end |
#put(queue, request) ⇒ Object
8 9 10 |
# File 'lib/requeus/adapter/sqs.rb', line 8 def put queue, request get_queue(queue).(request) end |