sqs settings modified

This commit is contained in:
Ubuntu 2024-05-01 04:58:44 +00:00
parent 37654cb4ec
commit 6b8db9f2e6
1 changed files with 23 additions and 18 deletions

View File

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