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 2019/05/02 06:07:17 UTC

[GitHub] [airflow] raviagarwalunravel commented on a change in pull request #5118: [AIRFLOW-4315] Add monitoring API's to airflow

raviagarwalunravel commented on a change in pull request #5118: [AIRFLOW-4315] Add monitoring API's to airflow
URL: https://github.com/apache/airflow/pull/5118#discussion_r280296301
 
 

 ##########
 File path: airflow/api/common/experimental/get_tasks.py
 ##########
 @@ -34,11 +33,5 @@ def get_dag_run_state(dag_id, execution_date):
     # Get DAG object and check Task Exists
     dag = dagbag.get_dag(dag_id)
 
-    # Get DagRun object and check that it exists
-    dagrun = dag.get_dagrun(execution_date=execution_date)
-    if not dagrun:
-        error_message = ('Dag Run for date {} not found in dag {}'
-                         .format(execution_date, dag_id))
-        raise DagRunNotFound(error_message)
-
-    return {'state': dagrun.get_state()}
+    # Return the task.
+    return dag.task_ids
 
 Review comment:
   What do you mean? We need to return the task_ids and make sure that the dag_id passed does exist. I don't understand this comment fully. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services