ms32035 commented on pull request #13199:
URL: https://github.com/apache/airflow/pull/13199#issuecomment-748692939


   * This view is not used as often as the DAG list for example, so I don't
   think the extra table would be an optimization.
   * To calculate dependencies all DAGs are required, which could impact
   multi-threaded DAG processing, and transactional update of the table with
   all recalculated dependencies and referential constraints enabled would be
   a hell. Otherwise, if the dependencies were recalculated when each DAG is
   processed, there's a risk of inconsistencies (links to DAGs that don't
   exist etc)
   
   On Sun, Dec 20, 2020 at 11:25 PM Kamil Breguła <[email protected]>
   wrote:
   
   > *@mik-laj* commented on this pull request.
   > ------------------------------
   >
   > In airflow/www/views.py
   > <https://github.com/apache/airflow/pull/13199#discussion_r546451698>:
   >
   > > +            self.last_refresh = datetime.utcnow()
   > +
   > +        return self.render_template(
   > +            "airflow/dag_dependencies.html",
   > +            title=title,
   > +            nodes=self.nodes,
   > +            edges=self.edges,
   > +            last_refresh=self.last_refresh.strftime("%Y-%m-%d %H:%M:%S"),
   > +            arrange=conf.get("webserver", "dag_orientation"),
   > +            width=request.args.get("width", "100%"),
   > +            height=request.args.get("height", "800"),
   > +        )
   > +
   > +    def _calculate_graph(self):
   > +
   > +        current_app.dag_bag.collect_dags_from_db()
   >
   > I am thinking of creating a new table that will contain only these
   > relationships and try to be kept in good condition by DagFileProcessor.
   > This way, we will only be able to read the information we need.
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/airflow/pull/13199#discussion_r546451698>, or
   > unsubscribe
   > 
<https://github.com/notifications/unsubscribe-auth/ABGTO6KUN77XHQMBRAOTCTTSV2BWJANCNFSM4VDMNXNQ>
   > .
   >
   


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


Reply via email to