Skip to content

Commit

Permalink
RightAws: SqsGen2Interface: receive_message fix (it failed when no an…
Browse files Browse the repository at this point in the history
…y attributes were specified)
  • Loading branch information
Konstantin committed Mar 31, 2010
1 parent 2f8fa3b commit 6a06316
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/sqs/right_sqs_gen2_interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ def remove_permissions(queue_url, label)
#
def receive_message(queue_url, max_number_of_messages=1, visibility_timeout=nil, attributes=nil)
return [] if max_number_of_messages == 0
params = amazonize_list('AttributeName', Array(attributes)) unless attributes.blank?
params = {}
params.merge!(amazonize_list('AttributeName', Array(attributes))) unless attributes.blank?
params.merge!('MaxNumberOfMessages' => max_number_of_messages,
'VisibilityTimeout' => visibility_timeout,
:queue_url => queue_url )
Expand Down

0 comments on commit 6a06316

Please sign in to comment.