uranusjr commented on a change in pull request #16931:
URL: https://github.com/apache/airflow/pull/16931#discussion_r729022127



##########
File path: airflow/models/dag.py
##########
@@ -2521,6 +2521,10 @@ def __init__(self, concurrency=None, **kwargs):
     def __repr__(self):
         return f"<DAG: {self.dag_id}>"
 
+    @cached_property
+    def timetable(self) -> Timetable:
+        return create_timetable(self.schedule_interval, self.timezone)

Review comment:
       Starting with Airflow 2.2, the user can specify a custom timetable for 
the DAG that's not backed by a `schedule_interval` value, and this won't work 
for those DAGs. So instead of adding a dynamic property, `DagModel` should gain 
a `timetable_description` column that's populated when the `DagModel` is 
updated from the source `DAG` instance.




-- 
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]


Reply via email to