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 2019/10/01 15:35:31 UTC

[GitHub] [airflow] XD-DENG commented on a change in pull request #6217: [AIRFLOW-5572] Clearing Task Instances with reschedule mode does not clear reschedules during up_for_reschedule

XD-DENG commented on a change in pull request #6217: [AIRFLOW-5572] Clearing Task Instances with reschedule mode does not clear reschedules during up_for_reschedule
URL: https://github.com/apache/airflow/pull/6217#discussion_r330127586
 
 

 ##########
 File path: airflow/models/taskinstance.py
 ##########
 @@ -94,6 +94,17 @@ def clear_task_instances(tis,
                 # outdated. We make max_tries the maximum value of its
                 # original max_tries or the current task try number.
                 ti.max_tries = max(ti.max_tries, ti.try_number - 1)
+
+            if ti.state == State.UP_FOR_RESCHEDULE:
 
 Review comment:
   I believe there may be `TaskReschedule` created, even if CURRENT state of `ti` is not `UP_FOR_RESCHEDULE` (say it **was** `UP_FOR_RESCHEDULE`)?
   In that case, this `if` can be removed.
   
   Kindly correct me if I'm wrong.

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


With regards,
Apache Git Services