Lee-W commented on code in PR #32809:
URL: https://github.com/apache/airflow/pull/32809#discussion_r1280051620


##########
airflow/providers/amazon/aws/sensors/sqs.py:
##########
@@ -131,19 +165,7 @@ def poll_sqs(self, sqs_conn: BaseAwsConnection) -> 
Collection:
             receive_message_kwargs["VisibilityTimeout"] = 
self.visibility_timeout
 
         response = sqs_conn.receive_message(**receive_message_kwargs)
-
-        if "Messages" not in response:
-            return []
-
-        messages = response["Messages"]
-        num_messages = len(messages)
-        self.log.info("Received %d messages", num_messages)
-
-        if num_messages and self.message_filtering:
-            messages = self.filter_messages(messages)
-            num_messages = len(messages)
-            self.log.info("There are %d messages left after filtering", 
num_messages)
-        return messages
+        return response

Review Comment:
   Got it.  Sounds good 👍



##########
airflow/providers/amazon/aws/sensors/sqs.py:
##########
@@ -131,19 +165,7 @@ def poll_sqs(self, sqs_conn: BaseAwsConnection) -> 
Collection:
             receive_message_kwargs["VisibilityTimeout"] = 
self.visibility_timeout
 
         response = sqs_conn.receive_message(**receive_message_kwargs)
-
-        if "Messages" not in response:
-            return []
-
-        messages = response["Messages"]
-        num_messages = len(messages)
-        self.log.info("Received %d messages", num_messages)
-
-        if num_messages and self.message_filtering:
-            messages = self.filter_messages(messages)
-            num_messages = len(messages)
-            self.log.info("There are %d messages left after filtering", 
num_messages)
-        return messages
+        return response

Review Comment:
   Got it.  Sounds good 👍



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to