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 20:05:30 UTC

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

mik-laj commented on a change in pull request #12745:
URL: https://github.com/apache/airflow/pull/12745#discussion_r533687889



##########
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:
       We have a serialized DAG here, so the isinstance function is not behaving properly. From the isinstance point of view, we have BaseOperator here.




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