Repository: incubator-airflow
Updated Branches:
  refs/heads/master e05254f87 -> 786e5223a


Revert "[AIRFLOW-1716] Fix multiple __init__ def in SimpleDag"

This reverts commit e05254f8731ac55e169cdc581a38b0d3fe06267d.


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

Branch: refs/heads/master
Commit: 786e5223ac3c395dd31e748e6776fdaf3dc4880f
Parents: e05254f
Author: Bolke de Bruin <[email protected]>
Authored: Sun Oct 22 19:42:40 2017 +0200
Committer: Bolke de Bruin <[email protected]>
Committed: Sun Oct 22 19:42:40 2017 +0200

----------------------------------------------------------------------
 airflow/utils/dag_processing.py | 35 +++++++++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/786e5223/airflow/utils/dag_processing.py
----------------------------------------------------------------------
diff --git a/airflow/utils/dag_processing.py b/airflow/utils/dag_processing.py
index c3b8a95..b80f701 100644
--- a/airflow/utils/dag_processing.py
+++ b/airflow/utils/dag_processing.py
@@ -36,13 +36,40 @@ class SimpleDag(BaseDag):
     required for instantiating and scheduling its associated tasks.
     """
 
-    def __init__(self, dag, pickle_id=None):
-        """
-        :param dag: the DAG object
-        :type dag: models.DAG
+    def __init__(self,
+                 dag_id,
+                 task_ids,
+                 full_filepath,
+                 concurrency,
+                 is_paused,
+                 pickle_id,
+                 task_special_args):
+        """
+        :param dag_id: ID of the DAG
+        :type dag_id: unicode
+        :param task_ids: task IDs associated with the DAG
+        :type task_ids: list[unicode]
+        :param full_filepath: path to the file containing the DAG e.g.
+        /a/b/c.py
+        :type full_filepath: unicode
+        :param concurrency: No more than these many tasks from the
+        dag should run concurrently
+        :type concurrency: int
+        :param is_paused: Whether or not this DAG is paused. Tasks from paused
+        DAGs are not scheduled
+        :type is_paused: bool
         :param pickle_id: ID associated with the pickled version of this DAG.
         :type pickle_id: unicode
         """
+        self._dag_id = dag_id
+        self._task_ids = task_ids
+        self._full_filepath = full_filepath
+        self._is_paused = is_paused
+        self._concurrency = concurrency
+        self._pickle_id = pickle_id
+        self._task_special_args = task_special_args
+
+    def __init__(self, dag, pickle_id=None):
         self._dag_id = dag.dag_id
         self._task_ids = [task.task_id for task in dag.tasks]
         self._full_filepath = dag.full_filepath

Reply via email to