GitHub user gopidesupavan added a comment to the discussion: ExternalTaskSensor 
(only for last dag runs) in Airflow 3

There are already functionality implemeted for getting count and states etc; 
look at this 
https://github.com/apache/airflow/blob/main/providers/standard/src/airflow/providers/standard/triggers/external_task.py#L142

```
from airflow.sdk.execution_time.task_runner import RuntimeTaskInstance
RuntimeTaskInstance.get_ti_count
RuntimeTaskInstance.get_task_states
RuntimeTaskInstance.get_dr_count
RuntimeTaskInstance.get_dagrun_state
RuntimeTaskInstance.get_dr_count
```

You can take a look and see whats useful in your scenario for above 

GitHub link: 
https://github.com/apache/airflow/discussions/49997#discussioncomment-14036618

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to