yuqian90 commented on issue #14260:
URL: https://github.com/apache/airflow/issues/14260#issuecomment-817780114
Does anyone know why this code needs to call `self.set_dag_runs_state`
separately? If we simply remove the `self.set_dag_runs_state` call and leave
`activate_dag_runs` as the default `True`, things will just work as expected.
```python
if do_it:
clear_task_instances(
tis,
session,
dag=self,
activate_dag_runs=False, # We will set DagRun state later.
)
self.set_dag_runs_state(
session=session,
start_date=start_date,
end_date=end_date,
state=dag_run_state,
)
```
--
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]