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


##########
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:
   @uranusjr What's your thought about this approach?



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