You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/10/14 14:07:06 UTC
[GitHub] [airflow] uranusjr commented on a change in pull request #16931: #16692 show cron description in UI
uranusjr commented on a change in pull request #16931:
URL: https://github.com/apache/airflow/pull/16931#discussion_r729020028
##########
File path: airflow/timetables/base.py
##########
@@ -94,6 +95,15 @@ def logical_date(self) -> DateTime:
class Timetable(Protocol):
"""Protocol that all Timetable classes are expected to implement."""
+ @cached_property
+ def interval_description(self) -> Optional[str]:
+ """Override to describe the interval.
+
+ For cron ``'30 21 * * 5'``, description could be like ``'At 09:30 PM, only on Friday'``.
+ This is used in the web UI.
+ """
+ return None
Review comment:
And there's really no point to cache this even in subclasses either. The property is easy to calculate, and generally only accessed once in web UI to render the value.
--
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