kaxil commented on code in PR #66102:
URL: https://github.com/apache/airflow/pull/66102#discussion_r3171536451
##########
task-sdk/src/airflow/sdk/definitions/timetables/_cron.py:
##########
@@ -27,13 +27,26 @@
from pendulum.tz.timezone import FixedTimezone, Timezone
+CRON_PRESETS: dict[str, str] = {
+ "@hourly": "0 * * * *",
+ "@daily": "0 0 * * *",
+ "@weekly": "0 0 * * 0",
+ "@monthly": "0 0 1 * *",
+ "@quarterly": "0 0 1 */3 *",
+ "@yearly": "0 0 1 1 *",
+}
Review Comment:
This duplicates `airflow.utils.dates.cron_presets`. Both dicts will need to
stay in sync if a new preset is ever added. Worth a comment pointing at the
other location, or making one re-export the other (the SDK can't import core,
but core could import this and re-export).
--
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]