You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/06/04 11:54:21 UTC

[GitHub] [airflow] ashb commented on a change in pull request #9087: Query TaskReschedule only if task is UP_FOR_RESCHEDULE

ashb commented on a change in pull request #9087:
URL: https://github.com/apache/airflow/pull/9087#discussion_r435195870



##########
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:
       Oh does `with_entites` say "just select this one column? Nice!




----------------------------------------------------------------
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:
users@infra.apache.org