Skip to content

Commit

Permalink
Fix #306 - Excessive logging when 0 messages found
Browse files Browse the repository at this point in the history
See also:
#291 (comment)
  • Loading branch information
Pablo Cantero committed Jan 25, 2017
1 parent 072fa7a commit afa4e9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/shoryuken/fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def fetch(queue, available_processors)
limit = available_processors > FETCH_LIMIT ? FETCH_LIMIT : available_processors

sqs_msgs = Array(receive_messages(queue, limit))
logger.info { "Found #{sqs_msgs.size} messages for '#{queue.name}'" }
logger.info { "Found #{sqs_msgs.size} messages for '#{queue.name}'" } if sqs_msgs.size > 0
logger.debug { "Fetcher for '#{queue}' completed in #{elapsed(started_at)} ms" }
sqs_msgs
rescue => ex
Expand Down

0 comments on commit afa4e9c

Please sign in to comment.