sqs settings modified
This commit is contained in:
parent
37654cb4ec
commit
6b8db9f2e6
|
@ -175,11 +175,15 @@ class Command(BaseCommand):
|
||||||
print("Started Executin this from conversion")
|
print("Started Executin this from conversion")
|
||||||
queue = sqs.get_queue_by_name(QueueName="mnfqueue")
|
queue = sqs.get_queue_by_name(QueueName="mnfqueue")
|
||||||
# try:
|
# try:
|
||||||
|
while True:
|
||||||
|
|
||||||
messages = queue.receive_messages(
|
messages = queue.receive_messages(
|
||||||
MessageAttributeNames=["All"],
|
MessageAttributeNames=["All"],
|
||||||
MaxNumberOfMessages=5,
|
MaxNumberOfMessages=5,
|
||||||
WaitTimeSeconds=20,
|
WaitTimeSeconds=10,
|
||||||
)
|
)
|
||||||
|
if len(messages) > 0:
|
||||||
|
|
||||||
for msg in messages:
|
for msg in messages:
|
||||||
try:
|
try:
|
||||||
print("Received message: %s: %s", msg.message_id, msg.body)
|
print("Received message: %s: %s", msg.message_id, msg.body)
|
||||||
|
@ -195,6 +199,7 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
print("error execution from queue: %s", error)
|
print("error execution from queue: %s", error)
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
print("Completed All Execution")
|
print("Completed All Execution")
|
||||||
|
|
Loading…
Reference in New Issue