mik-laj commented on a change in pull request #9087:
URL: https://github.com/apache/airflow/pull/9087#discussion_r435199093
##########
File path: airflow/ti_deps/deps/ready_to_reschedule.py
##########
@@ -52,14 +52,14 @@ def _get_dep_statuses(self, ti, session, dep_context):
reason="The task instance is not in State_UP_FOR_RESCHEDULE or
NONE state.")
return
- task_reschedules =
TaskReschedule.find_for_task_instance(task_instance=ti)
- if not task_reschedules:
+ task_reschedule =
TaskReschedule.query_for_task_instance(task_instance=ti,
descending=True).first()
Review comment:
Here is doc:
https://docs.sqlalchemy.org/en/13/orm/query.html#sqlalchemy.orm.query.Query.with_entities
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]