You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by fo...@apache.org on 2018/03/14 08:15:44 UTC

[5/6] incubator-airflow git commit: [AIRFLOW-2203] Remove Useless Commands.

[AIRFLOW-2203] Remove Useless Commands.

self.tasks is a temp list gen from self.task_dict. no reason to append
to it


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/6f0a0d2f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/6f0a0d2f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/6f0a0d2f

Branch: refs/heads/master
Commit: 6f0a0d2f6f8203d2c6542a8eaefe2cbb2640a8d3
Parents: 81ec595
Author: wongwill86 <wo...@gmail.com>
Authored: Mon Mar 12 17:01:35 2018 -0400
Committer: Fokko Driesprong <fo...@godatadriven.com>
Committed: Wed Mar 14 09:11:56 2018 +0100

----------------------------------------------------------------------
 airflow/models.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/6f0a0d2f/airflow/models.py
----------------------------------------------------------------------
diff --git a/airflow/models.py b/airflow/models.py
index 74a54bb..8931ac6 100755
--- a/airflow/models.py
+++ b/airflow/models.py
@@ -3823,11 +3823,10 @@ class DAG(BaseDag, LoggingMixin):
                 'exception.'.format(task.task_id),
                 category=PendingDeprecationWarning)
         else:
-            self.tasks.append(task)
             self.task_dict[task.task_id] = task
             task.dag = self
 
-        self.task_count = len(self.tasks)
+        self.task_count = len(self.task_dict)
 
     def add_tasks(self, tasks):
         """