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 2020/12/01 19:32:16 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #12745: Optimize subclasses of DummyOperator for Scheduling

kaxil commented on a change in pull request #12745:
URL: https://github.com/apache/airflow/pull/12745#discussion_r533668834



##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -532,6 +540,13 @@ def _serialize_operator_extra_links(cls, operator_extra_links: Iterable[BaseOper
 
         return serialize_operator_extra_links
 
+    @classmethod
+    def _is_inherited_from_dummy_operator(cls, op: BaseOperator) -> bool:
+        """Used to determine if an Operator is inherited from DummyOperator"""
+        if op.task_type == "DummyOperator" or isinstance(op, DummyOperator):

Review comment:
       I did not add check to see if the execute method is empty or not like we discussed @ashb. My thinking for that was as it is a DummyOperator where we list it should do nothing, let's just keep it simple.
   
   WDYT?




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