Return messages once they are gathered

If one or more messages are available, stop waiting and return them.
This commit is contained in:
Dustin J. Mitchell 2015-08-31 11:26:10 -04:00
parent b55600ce42
commit 00e40c487e

View File

@ -281,7 +281,7 @@ class SQSBackend(BaseBackend):
if len(result) >= count: if len(result) >= count:
break break
if time.time() > polling_end: if result or time.time() > polling_end:
break break
return result return result