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/02/27 11:25:01 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #14500: Clear tasks by task ids in REST API

turbaszek commented on a change in pull request #14500:
URL: https://github.com/apache/airflow/pull/14500#discussion_r584109095



##########
File path: airflow/models/dag.py
##########
@@ -1227,6 +1230,8 @@ def clear(
             tis = tis.filter(or_(TI.state == State.FAILED, TI.state == State.UPSTREAM_FAILED))
         if only_running:
             tis = tis.filter(TI.state == State.RUNNING)
+        if task_ids:
+            tis = tis.filter(TI.task_id.in_(task_ids))

Review comment:
       How this will work with 
   ```
    tis = tis.filter(TI.task_id.in_(self.task_ids))
   ```
   from L1197?




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