o-nikolas commented on code in PR #39624:
URL: https://github.com/apache/airflow/pull/39624#discussion_r1601963222
##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -1566,22 +1566,22 @@ def _fail_tasks_stuck_in_queued(self, session: Session
= NEW_SESSION) -> None:
TI.queued_by_job_id == self.job.id,
)
).all()
- try:
- 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.warning(
- "Marking task instance %s stuck in queued as failed. "
- "If the task instance has available retries, it will
be retried.",
- ti,
- ti=ti,
- )
- except NotImplementedError:
- self.log.debug("Executor doesn't support cleanup of stuck queued
tasks. Skipping.")
- ...
+
+ for executor, stuck_tis in
self._executor_to_tis(tasks_stuck_in_queued).items():
+ try:
+ cleaned_up_task_instances =
set(executor.cleanup_stuck_queued_tasks(tis=stuck_tis))
+ for ti in stuck_tis:
+ if repr(ti) in cleaned_up_task_instances:
+ # TODO: Update this message to include the executor?
+ self._task_context_logger.warning(
+ "Marking task instance %s stuck in queued as
failed. "
+ "If the task instance has available retries, it
will be retried.",
+ ti,
+ ti=ti,
+ )
+ except NotImplementedError:
+ self.log.debug("Executor doesn't support cleanup of stuck
queued tasks. Skipping.")
+ ...
Review Comment:
Yeah, it was there before, I haven't examined the git blame but I assume the
except block did not log at some point so the ellipses was needed then. I'll
remove it now :+1:
--
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]