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 2021/01/18 20:48:29 UTC
[GitHub] [airflow] kaxil commented on a change in pull request #13165: Filter DagRuns with Task Instances in removed State while Scheduling
kaxil commented on a change in pull request #13165:
URL: https://github.com/apache/airflow/pull/13165#discussion_r546154660
##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -1503,7 +1503,7 @@ def _do_scheduling(self, session) -> int:
)
.filter(
TI.dag_id.in_(list({dag_run.dag_id for dag_run in dag_runs})),
- TI.state.notin_(list(State.finished)),
+ TI.state.notin_(list(State.finished) + [State.REMOVED]),
Review comment:
I didn't add it to `State.finished` deliberately
https://github.com/apache/airflow/blob/419111696d58f0ed76b5cd6ab99db9f68478f11f/airflow/utils/state.py#L103-L118
coz the task in the removed state is never executed
----------------------------------------------------------------
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