uranusjr commented on code in PR #33196:
URL: https://github.com/apache/airflow/pull/33196#discussion_r1289738390
##########
airflow/sensors/base.py:
##########
@@ -330,6 +330,16 @@ def reschedule(self):
def get_serialized_fields(cls):
return super().get_serialized_fields() | {"reschedule"}
+ def raise_failed_or_skiping_exception(self, failed_message: str,
skipping_message: str = "") -> None:
+ """Raise AirflowSkipException if self.soft_fail is set to True.
Otherwise raise AirflowException."""
+ if self.soft_fail:
+ if skipping_message:
+ message = skipping_message
+ else:
+ message = failed_message
+ raise AirflowSkipException(message)
Review Comment:
```suggestion
raise AirflowSkipException(skipping_message or failed_message)
```
--
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]