You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/07/29 22:58:34 UTC
[GitHub] [airflow] hussein-awala commented on a diff in pull request #32921: Add resetting of seconds and microseconds that fixes runs losing by CronTriggerTimetable
hussein-awala commented on code in PR #32921:
URL: https://github.com/apache/airflow/pull/32921#discussion_r1278449186
##########
airflow/timetables/trigger.py:
##########
@@ -89,7 +89,7 @@ def next_dagrun_info(
else:
next_start_time = self._align_to_next(restriction.earliest)
else:
- start_time_candidates = [self._align_to_next(DateTime.utcnow())]
+ start_time_candidates = [self._align_to_next(DateTime.utcnow().replace(second=0, microsecond=0))]
Review Comment:
This makes sense :thinking:
Could you add a test for this change? (a test which fails without resetting seconds and microsecond and passes after applying your change)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org