Fokko commented on a change in pull request #4871: [AIRFLOW-3844][WIP] Remove 
DagBag from /landing_times.
URL: https://github.com/apache/airflow/pull/4871#discussion_r264040210
 
 

 ##########
 File path: airflow/models/__init__.py
 ##########
 @@ -2805,6 +2806,18 @@ class DagModel(Base):
     def __repr__(self):
         return "<DAG: {self.dag_id}>".format(self=self)
 
+    @property
+    def _schedule_interval(self):
+        """'Normalized' schedule interval, which is either a timedelta or a 
cron
+           interval (i.e. does not contain special intervals such as @once or 
@daily).
+        """
+        interval = self.schedule_interval
+        if isinstance(interval, Hashable) and interval in cron_presets:
 
 Review comment:
   In this case, the `interval` is just a `str`. Why Hashable? I would 
implement this as `isinstance(interval, six.string_types)`: 
https://pythonhosted.org/six/#six.string_types

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to