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/07/18 14:00:47 UTC

[GitHub] [airflow] pateash commented on a diff in pull request #24902: Allowing task_group Sensor in ExternalTaskSensor

pateash commented on code in PR #24902:
URL: https://github.com/apache/airflow/pull/24902#discussion_r923409090


##########
airflow/models/dag.py:
##########
@@ -2120,6 +2120,13 @@ def filter_task_group(group, parent_group):
     def has_task(self, task_id: str):
         return task_id in self.task_dict
 
+    def has_task_group(self, task_group_id: str):
+        return task_group_id in self.task_group_dict
+
+    @property
+    def task_group_dict(self):
+        return {k: v for k, v in self._task_group.get_task_group_dict().items() if k is not None}

Review Comment:
   thanks @uranusjr, added **cached_property**
   
   I filtered root group as its not actually a 'TaskGroup' which we might look for.



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