This is an automated email from the ASF dual-hosted git repository. kaxilnaik pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push: new ee36142 Remove unused recurse_tasks function (#9465) ee36142 is described below commit ee361427416197da20b7f0db6df3cf66b7e82912 Author: Kaxil Naik <kaxiln...@gmail.com> AuthorDate: Tue Jun 23 00:34:39 2020 +0100 Remove unused recurse_tasks function (#9465) --- airflow/www/utils.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/airflow/www/utils.py b/airflow/www/utils.py index a65260e..37d47c1 100644 --- a/airflow/www/utils.py +++ b/airflow/www/utils.py @@ -30,8 +30,6 @@ from pygments import highlight, lexers from pygments.formatters import HtmlFormatter from airflow.configuration import conf -from airflow.models.baseoperator import BaseOperator -from airflow.operators.subdag_operator import SubDagOperator from airflow.utils import timezone from airflow.utils.code_utils import get_python_source from airflow.utils.json import AirflowJsonEncoder @@ -343,23 +341,6 @@ def get_attr_renderer(): } -def recurse_tasks(tasks, task_ids, dag_ids, task_id_to_dag): # noqa: D103 - if isinstance(tasks, list): - for task in tasks: - recurse_tasks(task, task_ids, dag_ids, task_id_to_dag) - return - if isinstance(tasks, SubDagOperator): - subtasks = tasks.subdag.tasks - dag_ids.append(tasks.subdag.dag_id) - for subtask in subtasks: - if subtask.task_id not in task_ids: - task_ids.append(subtask.task_id) - task_id_to_dag[subtask.task_id] = tasks.subdag - recurse_tasks(subtasks, task_ids, dag_ids, task_id_to_dag) - if isinstance(tasks, BaseOperator): - task_id_to_dag[tasks.task_id] = tasks.dag - - def get_chart_height(dag): """ TODO(aoen): See [AIRFLOW-1263] We use the number of tasks in the DAG as a heuristic to