pateash commented on a change in pull request #16931:
URL: https://github.com/apache/airflow/pull/16931#discussion_r735139208
##########
File path: airflow/timetables/interval.py
##########
@@ -124,6 +125,19 @@ def __init__(self, cron: str, timezone: Timezone) -> None:
self._expression = cron_presets.get(cron, cron)
self._timezone = timezone
+ descriptor = ExpressionDescriptor(
+ expression=self._expression, casing_type=CasingTypeEnum.Sentence,
use_24hour_time_format=True
+ )
+ try:
+ # checking for more than 5 parameters in Cron and avoiding
evaluation for now,
+ # as Croniter has inconsistent evaluation with other libraries
+ if self._expression.count(" ") > 4:
+ raise FormatException()
Review comment:
I didn't know about croniter.expanded, this is much better.
--
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]