uranusjr commented on a change in pull request #21715:
URL: https://github.com/apache/airflow/pull/21715#discussion_r816294334
##########
File path: airflow/timetables/interval.py
##########
@@ -211,6 +217,17 @@ def _align(self, current: DateTime) -> DateTime:
return next_time
return current
+ def _prev_align(self, current: DateTime) -> DateTime:
+ """Get the prev scheduled time.
+
+ This is ``current - interval``, unless ``current`` falls right on the
+ interval boundary, when ``current`` is returned.
+ """
+ prev_time = self._get_prev(current)
+ if self._get_next(prev_time) != current:
+ return prev_time
+ return current
Review comment:
Also we need to document pretty thoroughly _why_ we need both functions.
--
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]