From 63296049f1a7c9b8bd7ecbfe7172ced576ca3c5d Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Sun, 14 Feb 2016 17:10:17 -0500 Subject: [PATCH] More explicit SQS message checking. Closes #519. --- moto/sqs/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moto/sqs/models.py b/moto/sqs/models.py index 19268d519..07699ecbc 100644 --- a/moto/sqs/models.py +++ b/moto/sqs/models.py @@ -285,6 +285,8 @@ class SQSBackend(BaseBackend): # queue.messages only contains visible messages while True: for message in queue.messages: + if not message.visible: + continue message.mark_received( visibility_timeout=queue.visibility_timeout )