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



##########
File path: airflow/models/taskinstance.py
##########
@@ -1719,6 +1720,11 @@ def handle_failure(
             self.state = State.FAILED
             email_for_state = task.email_on_failure
         else:
+            if self.state == State.QUEUED:
+                # We increase the try_number so as
+                # to fail the task if it fails to start
+                # after sometime
+                self.try_number += 1

Review comment:
       (This might not have any affect but is more correct -- as that way we 
don't have to reason about "has the try_number property already added 1 to this 
value or not")




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


Reply via email to