Lee-W commented on code in PR #40924:
URL: https://github.com/apache/airflow/pull/40924#discussion_r1690654838


##########
airflow/sensors/base.py:
##########
@@ -114,15 +118,33 @@ def _orig_start_date(
     )
 
 
+class SkipPolicy(str, enum.Enum):
+    """Class with sensor's skip policies."""
+
+    # if poke method raise an exception, sensor will not be skipped on.
+    NONE = "none"
+
+    # If poke method raises an exception, sensor will be skipped on.
+    SKIP_ON_ANY_ERROR = "skip_on_any_error"
+
+    # If poke method raises AirflowSensorTimeout, AirflowTaskTimeout, 
AirflowFailException
+    # sensor will be skipped on.
+    SKIP_ON_SOFT_ERROR = "skip_on_soft_error"
+
+    # If poke method raises an exception  different from AirflowSensorTimeout, 
AirflowTaskTimeout,
+    # AirflowSkipException, sensor will ignore exception and re-poke until 
timeout.
+    IGNORE_ERROR = "ignore_error"

Review Comment:
   Hi, sorry for the late reply. Nothing comes to my mind as of now. As long as 
we document it, I think we're good. Thanks 🙂 Resolve this conversation. 



##########
airflow/sensors/base.py:
##########
@@ -114,15 +118,33 @@ def _orig_start_date(
     )
 
 
+class SkipPolicy(str, enum.Enum):
+    """Class with sensor's skip policies."""
+
+    # if poke method raise an exception, sensor will not be skipped on.
+    NONE = "none"
+
+    # If poke method raises an exception, sensor will be skipped on.
+    SKIP_ON_ANY_ERROR = "skip_on_any_error"
+
+    # If poke method raises AirflowSensorTimeout, AirflowTaskTimeout, 
AirflowFailException
+    # sensor will be skipped on.
+    SKIP_ON_SOFT_ERROR = "skip_on_soft_error"

Review Comment:
   Hi, sorry for the late reply. Nothing comes to my mind as of now. As long as 
we document it, I think we're good. Thanks 🙂 Resolve this conversation. 



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