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/05/27 14:12:31 UTC

[GitHub] [airflow] yuqian90 commented on a change in pull request #15382: Fix dag.clear() to set multiple dags to running when necessary

yuqian90 commented on a change in pull request #15382:
URL: https://github.com/apache/airflow/pull/15382#discussion_r640663521



##########
File path: airflow/api_connexion/endpoints/task_instance_endpoint.py
##########
@@ -251,18 +251,8 @@ def post_clear_task_instances(dag_id: str, session=None):
     task_instances = dag.clear(get_tis=True, **data)
     if not data["dry_run"]:
         clear_task_instances(
-            task_instances,
-            session,
-            dag=dag,
-            activate_dag_runs=False,  # We will set DagRun state later.
+            task_instances, session, dag=dag, dag_run_state=State.RUNNING if reset_dag_runs else None
         )
-        if reset_dag_runs:
-            dag.set_dag_runs_state(

Review comment:
       Done.




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