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 2022/01/26 07:05:50 UTC

[GitHub] [airflow] nclaeys edited a comment on issue #20982: Triggered tasks from web-ui are killed by scheduler because they are orphaned task instances

nclaeys edited a comment on issue #20982:
URL: https://github.com/apache/airflow/issues/20982#issuecomment-1020423715


   @potiuk I will take a look at it. I am not that familiar with the inner workings of airflow, but I think that the query for orphaned tasks is wrong. At the moment it does:
   ```
   session.query(TI)
                           .filter(TI.state.in_(resettable_states))
                           .outerjoin(TI.queued_by_job)
                           .filter(or_(TI.queued_by_job_id.is_(None), SchedulerJob.state != State.RUNNING))
                           .join(TI.dag_run)
                           .filter(
                               DagRun.run_type != DagRunType.BACKFILL_JOB,
                               DagRun.state == State.RUNNING,
                           )
   ```
   and I think that in my case the DagRun.run_type == DagRunType.Manual. I will validate this and supply a fix for it.


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org