sunank200 commented on code in PR #40084:
URL: https://github.com/apache/airflow/pull/40084#discussion_r1684696476
##########
airflow/triggers/temporal.py:
##########
@@ -84,7 +95,11 @@ class TimeDeltaTrigger(DateTimeTrigger):
While this is its own distinct class here, it will serialise to a
DateTimeTrigger class, since they're operationally the same.
+
+ :param delta: how long to wait
+ :param end_from_trigger: whether the trigger should mark the task
successful after time condition
+ reached or resume the task after time condition reached.
"""
- def __init__(self, delta: datetime.timedelta):
- super().__init__(moment=timezone.utcnow() + delta)
+ def __init__(self, delta: datetime.timedelta, *, end_from_trigger: bool =
False):
Review Comment:
Changed it.
##########
airflow/triggers/temporal.py:
##########
@@ -34,9 +34,13 @@ class DateTimeTrigger(BaseTrigger):
a few seconds.
The provided datetime MUST be in UTC.
+
+ :param moment: when to yield event
+ :param end_from_trigger: whether the trigger should mark the task
successful after time condition
+ reached or resume the task after time condition reached.
"""
- def __init__(self, moment: datetime.datetime):
+ def __init__(self, moment: datetime.datetime, *, end_from_trigger: bool =
False):
Review Comment:
Changed 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]