hussein-awala commented on code in PR #34127:
URL: https://github.com/apache/airflow/pull/34127#discussion_r1328130663


##########
airflow/providers/cncf/kubernetes/utils/pod_manager.py:
##########
@@ -403,16 +407,17 @@ def consume_logs(
             """
             last_captured_timestamp = None
             try:
-                logs = self.read_pod_logs(
-                    pod=pod,
-                    container_name=container_name,
-                    timestamps=True,
-                    since_seconds=(
-                        math.ceil((pendulum.now() - 
since_time).total_seconds()) if since_time else None
-                    ),
-                    follow=follow,
-                    post_termination_timeout=termination_timeout,
-                )
+                if not logs:

Review Comment:
   I'm not sure if reusing the same `PodLogsConsumer` would fix the issue.
   
   The next time when you reuse it, it will call the method `__iter__` and then 
all the other methods as if it's a new `PodLogsConsumer` instance.
   
   Did you have the opportunity to test it?  



-- 
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