RNHTTR commented on code in PR #39177:
URL: https://github.com/apache/airflow/pull/39177#discussion_r1575411494


##########
airflow/utils/log/file_task_handler.py:
##########
@@ -384,7 +380,13 @@ def _read(
             worker_log_full_path = Path(self.local_base, worker_log_rel_path)
             local_messages, local_logs = 
self._read_from_local(worker_log_full_path)
             messages_list.extend(local_messages)
-        if is_running and not executor_messages:
+        if (
+            ti.state in (TaskInstanceState.RUNNING, TaskInstanceState.DEFERRED)
+            and not executor_messages
+            and not remote_logs

Review Comment:
   Aren't remote logs written after a task instance completes? Would there ever 
be a situation where a task is running _and_ it has remote logs for that try 
number?



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