uranusjr commented on code in PR #46846:
URL: https://github.com/apache/airflow/pull/46846#discussion_r1970196042


##########
airflow/timetables/trigger.py:
##########
@@ -61,7 +62,122 @@ def _deserialize_run_immediately(value: bool | float) -> 
bool | datetime.timedel
     return value
 
 
-class CronTriggerTimetable(CronMixin, Timetable):
+class _TriggerTimetable(Timetable):
+    _interval: datetime.timedelta | relativedelta
+
+    def infer_manual_data_interval(self, *, run_after: DateTime) -> 
DataInterval:
+        return DataInterval(
+            coerce_datetime(run_after - self._interval),
+            run_after,
+        )
+
+    def _calc_first_run(self) -> DateTime:
+        """
+        If no start_time is set, determine the start.
+
+        If True, always prefer past run, if False, never. If None, if within 
10% of next run,
+        if timedelta, if within that timedelta from past run.

Review Comment:
   See discussion in #41558



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