turbaszek commented on a change in pull request #10729:
URL: https://github.com/apache/airflow/pull/10729#discussion_r485387065
##########
File path: airflow/jobs/backfill_job.py
##########
@@ -829,3 +831,78 @@ def _execute(self, session=None):
executor.end()
self.log.info("Backfill done. Exiting.")
+
+ @provide_session
+ def reset_state_for_orphaned_tasks(self, filter_by_dag_run=None,
session=None):
+ """
+ This function checks if there are any tasks in the dagrun (or all)
+ that have a scheduled state but are not known by the
+ executor. If it finds those it will reset the state to None
Review comment:
```suggestion
that have a SCHEDULED or QUEUED state but are not known by the
executor. If it finds those it will reset the state to NONE
```
What do you think?
----------------------------------------------------------------
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]