Taragolis commented on code in PR #36134:
URL: https://github.com/apache/airflow/pull/36134#discussion_r1421437692
##########
airflow/timetables/events.py:
##########
@@ -79,22 +82,34 @@ def next_dagrun_info(
last_automated_data_interval: DataInterval | None,
restriction: TimeRestriction,
) -> DagRunInfo | None:
- if last_automated_data_interval is None:
- next_event = self.event_dates[0]
- else:
- future_dates = itertools.dropwhile(
- lambda when: when <= last_automated_data_interval.end, #
type: ignore
- self.event_dates,
- )
- next_event = next(future_dates, None) # type: ignore
- if next_event is None:
- return None
+ earliest = restriction.earliest
+ if not restriction.catchup:
+ current_time = pendulum.DateTime.utcnow()
Review Comment:
I would recommend to use `airflow.utils.timezone.utcnow` for this one
instead of direct use `pendulum.DateTime.utcnow()`.
We might potentially get rid of `pendulum` in the future, and this might
help to replace this easier
--
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]