This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 4b89c8a8b2 Docstring improvement to _covers_every_hour (#36081)
4b89c8a8b2 is described below
commit 4b89c8a8b2af6f85c6fcc0d61fe0d58c1f8d4d80
Author: Tzu-ping Chung <[email protected]>
AuthorDate: Thu Dec 7 06:54:05 2023 +0800
Docstring improvement to _covers_every_hour (#36081)
---
airflow/timetables/_cron.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/airflow/timetables/_cron.py b/airflow/timetables/_cron.py
index 9f5878b197..31e3cf14c1 100644
--- a/airflow/timetables/_cron.py
+++ b/airflow/timetables/_cron.py
@@ -45,11 +45,11 @@ def _covers_every_hour(cron: croniter) -> bool:
the last run was 2:30am (UTC+2), the next needs to be 2:30am (UTC+1,
folded)
instead of 3:30am.
- While this technically happens for all runs (in such a timezone), we only
- really care about runs that happen at least once an hour, and can
- provide a somewhat reasonable rationale to skip the fold hour for things
- such as ``*/2`` (every two hour). So we try to *minially* peak into
croniter
- internals to work around the issue.
+ While this technically happens for all cron schedules (in such a timezone),
+ we only care about schedules that create at least one run every hour, and
+ can provide a somewhat reasonable rationale to skip the fold hour for
things
+ such as ``*/2`` (every two hours). Therefore, we try to *minially* peak
into
+ croniter internals to work around the issue.
The check is simple since croniter internally normalizes things to ``*``.
More edge cases can be added later as needed.