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 2018/12/28 19:16:23 UTC
[GitHub] jmcarp commented on a change in pull request #4390:
[WIP][AIRFLOW-3584] Use ORM DAGs for index view.
jmcarp commented on a change in pull request #4390: [WIP][AIRFLOW-3584] Use ORM DAGs for index view.
URL: https://github.com/apache/incubator-airflow/pull/4390#discussion_r244388833
##########
File path: airflow/models/__init__.py
##########
@@ -2973,6 +2987,8 @@ class DagModel(Base):
description = Column(Text)
# Default view of the inside the webserver
default_view = Column(String(25))
+ # Schedule interval
+ schedule_interval = Column(PickleType(pickler=dill))
Review comment:
Pickling was the simplest option, since we currently support cron-like strings, `datetime.timedelta`, and `dateutil.relativedelta`, but we could write our own serialization format instead. One simple option would be to store the type, along with whitelisted attributes, as json: `{"type": "relativedelta", "args": {"months": 2}}`. There are other fields we might need to add to `DagModel` that will also take some thinking about serialization, like `default_args`, and we might wind up pickling those too.
What do you think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services