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/07/27 12:23:01 UTC
[GitHub] [airflow] kaxil commented on a change in pull request #16860: Support DAGS folder being in different location on scheduler and runners
kaxil commented on a change in pull request #16860:
URL: https://github.com/apache/airflow/pull/16860#discussion_r677396217
##########
File path: airflow/models/dag.py
##########
@@ -2115,15 +2151,18 @@ def bulk_write_to_db(cls, dags: Collection["DAG"], session=None):
.group_by(DagRun.dag_id)
.all()
)
+ filelocs = []
for orm_dag in sorted(orm_dags, key=lambda d: d.dag_id):
dag = dag_by_ids[orm_dag.dag_id]
if dag.is_subdag:
+ filelocs.append(dag.fileloc)
orm_dag.is_subdag = True
orm_dag.fileloc = dag.parent_dag.fileloc # type: ignore
orm_dag.root_dag_id = dag.parent_dag.dag_id # type: ignore
orm_dag.owners = dag.parent_dag.owner # type: ignore
else:
+ filelocs.append(dag.fileloc)
Review comment:
Could we move this outside the if/else as we have the same command in both cases
--
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