def get_message(self, queue_url):
    sqs = self.connect()
    if (queue_url is None):
        raise Exception('Queue name must be informed')
    queue_name = os.path.basename(queue_url)
    try:
        queue = sqs.get_queue_by_name(QueueName=queue_name)
        message = queue.receive_messages(AttributeNames=['All'], MaxNumberOfMessages=1, VisibilityTimeout=5, WaitTimeSeconds=1)
    except Exception as err:
        self.logger.error(err)
        self.exception = err
        message = None
    return message
def get_message(self, queue_url):
    sqs = self.connect()
    if (queue_url is None):
        raise Exception('Queue name must be informed')
    queue_name = os.path.basename(queue_url)
    try:
        queue = sqs.get_queue_by_name(QueueName=queue_name)
        message = queue.receive_messages(AttributeNames=['All'], MaxNumberOfMessages=1, VisibilityTimeout=5, WaitTimeSeconds=1)
    except Exception as err:
        self.logger.error(err)
        self.exception = err
        message = None
    return message