Skip to content

Commit

Permalink
delete_message_batch failed is returning nil rather than empty array …
Browse files Browse the repository at this point in the history
…as before, default to empty array if nil returned (#754)
  • Loading branch information
JohnMaguir authored Nov 28, 2023
1 parent c966255 commit 7b8cbc7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/shoryuken/queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ def visibility_timeout
end

def delete_messages(options)
client.delete_message_batch(
failed_messages = client.delete_message_batch(
options.merge(queue_url: url)
).failed.any? do |failure|
).failed || []
failed_messages.any? do |failure|
logger.error do
"Could not delete #{failure.id}, code: '#{failure.code}', message: '#{failure.message}', sender_fault: #{failure.sender_fault}"
end
Expand Down

0 comments on commit 7b8cbc7

Please sign in to comment.