Skip to content

Commit

Permalink
Merge pull request #19 from cuda-networks/additional_logging
Browse files Browse the repository at this point in the history
Additional logging
  • Loading branch information
alexeyts authored Feb 22, 2018
2 parents e19fa45 + 4ad7dc3 commit 90192af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions eb_sqs/worker/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ def delete_messages(self, queue, msg_entries):
# type: (Queue, list) -> None
if len(msg_entries) > 0:
response = queue.delete_messages(Entries=msg_entries)
logger.debug('[django-eb-sqs] Deleted {} messages successfully'.format(
len(response.get('Successful', []))
))
logger.debug('[django-eb-sqs] Failed deleting {} messages'.format(
len(response.get('Failed', []))
))

# logging
failed = response.get('Failed', [])
num_failed = len(failed)
if num_failed > 0:
logger.warning('[django-eb-sqs] Failed deleting {} messages: {}'.format(num_failed, failed))

def poll_messages(self, queue):
# type: (Queue) -> list
Expand Down

0 comments on commit 90192af

Please sign in to comment.