diff --git a/lib/queue/queue.py b/lib/queue/queue.py index 0e228c3..eb0c233 100644 --- a/lib/queue/queue.py +++ b/lib/queue/queue.py @@ -1,4 +1,5 @@ import json +import time from typing import List, Dict, Tuple import os import threading @@ -170,6 +171,7 @@ def receive_messages(self, batch_size: int = 1): Receive messages from a queue. """ queue = self.get_or_create_queue(self.input_queue_name)[0] + time.sleep(0.5) return [(m, self.input_queue_name) for m in queue.receive_messages(MaxNumberOfMessages=min(batch_size, SQS_MAX_BATCH_SIZE))] def find_queue_by_name(self, queue_name: str) -> boto3.resources.base.ServiceResource: