Lee-W commented on code in PR #33403:
URL: https://github.com/apache/airflow/pull/33403#discussion_r1295335522
##########
airflow/triggers/temporal.py:
##########
@@ -34,18 +35,29 @@ class DateTimeTrigger(BaseTrigger):
The provided datetime MUST be in UTC.
"""
- def __init__(self, moment: datetime.datetime):
+ def __init__(self, moment: datetime.datetime, soft_fail: bool = False):
super().__init__()
if not isinstance(moment, datetime.datetime):
- raise TypeError(f"Expected datetime.datetime type for moment. Got
{type(moment)}")
+ exc = TypeError(f"Expected datetime.datetime type for moment. Got
{type(moment)}")
+ if soft_fail:
+ raise AirflowSkipException("Skipping due to soft_fail is set
to True.") from exc
+ raise exc
Review Comment:
Sure. just updated it!
##########
airflow/triggers/temporal.py:
##########
@@ -34,18 +35,29 @@ class DateTimeTrigger(BaseTrigger):
The provided datetime MUST be in UTC.
"""
- def __init__(self, moment: datetime.datetime):
+ def __init__(self, moment: datetime.datetime, soft_fail: bool = False):
Review Comment:
Sure. just updated it!
--
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]