uranusjr commented on code in PR #25594:
URL: https://github.com/apache/airflow/pull/25594#discussion_r940113016


##########
airflow/models/mappedoperator.py:
##########
@@ -383,6 +386,13 @@ def inherits_from_empty_operator(self) -> bool:
         """Implementing Operator."""
         return self._is_empty
 
+    @property
+    def reschedule(self) -> bool:
+        """Check if the operator is a sensor and has mode reschedule"""
+        if self._is_sensor:
+            return self.partial_kwargs['mode'] == 'reschedule'
+        raise AttributeError("reschedule is not defined for MappedOperator")
+

Review Comment:
   Would it be easier if we just make `reschedule` a separate attribute, and 
calculate that when a MappedOperator is created? This seem easier than adding a 
new `_is_sensor` that does not exist on BaseOperator.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to