ephraimbuddy commented on code in PR #35857:
URL: https://github.com/apache/airflow/pull/35857#discussion_r1405351054
##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -1577,15 +1577,18 @@ def _fail_tasks_stuck_in_queued(self, session: Session
= NEW_SESSION) -> None:
)
).all()
try:
- tis_for_warning_message =
self.job.executor.cleanup_stuck_queued_tasks(tis=tasks_stuck_in_queued)
- if tis_for_warning_message:
- task_instance_str = "\n\t".join(tis_for_warning_message)
- self.log.warning(
- "Marked the following %s task instances stuck in queued as
failed. "
- "If the task instance has available retries, it will be
retried.\n\t%s",
- len(tasks_stuck_in_queued),
- task_instance_str,
- )
+ cleaned_up_task_instances =
self.job.executor.cleanup_stuck_queued_tasks(
+ tis=tasks_stuck_in_queued
+ )
+ cleaned_up_task_instances = set(cleaned_up_task_instances)
+ for ti in tasks_stuck_in_queued:
+ if repr(ti) in cleaned_up_task_instances:
+ self._task_context_logger.error(
Review Comment:
```suggestion
self._task_context_logger.warning(
```
--
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]