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 2020/02/17 18:08:52 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #7217: [WIP] [AIRFLOW-NNNN] Store DAG's source code in the serialized_dag table

mik-laj commented on a change in pull request #7217: [WIP] [AIRFLOW-NNNN] Store DAG's source code in the serialized_dag table
URL: https://github.com/apache/airflow/pull/7217#discussion_r380316629
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -520,16 +521,60 @@ def last_dagruns(self, session=None):
     @has_access
     @provide_session
     def code(self, session=None):
-        dm = models.DagModel
-        dag_id = request.args.get('dag_id')
-        dag = session.query(dm).filter(dm.dag_id == dag_id).first()
-        try:
+
+        def get_serialized_dag(dag_id):
 
 Review comment:
   These functions look very complex. Can you move them to another module? This will allow their use also by other classes, e.g. API

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services