예제 #1
0
 def pause_dag(self, dag_id, execution_date):
     """
     Sets the pause flag on this dag/execution
     """
     try:
         AIRFLOW_DB.pause_dag_run(dag_id=dag_id,
                                  execution_date=execution_date)
     except AirflowStateError as state_error:
         raise ApiError(title='Unable to pause action',
                        description=state_error.message,
                        status=falcon.HTTP_409)
예제 #2
0
 def _get_tasks_db(dag_id, execution_date):
     """
     Wrapper for call to the airflow db to get all tasks for a dag run
     :returns: a list of task dictionaries
     """
     return AIRFLOW_DB.get_tasks_by_id(dag_id=dag_id,
                                       execution_date=execution_date)
예제 #3
0
 def get_dag_run_db(self, dag_id, execution_date):
     """
     Wrapper for call to the airflow db to get a dag_run
     :returns: a dag run dictionaries
     """
     return AIRFLOW_DB.get_dag_runs_by_id(
         dag_id=dag_id, execution_date=execution_date)
예제 #4
0
 def _get_dag_run_like_id_db(self, dag_id, execution_date):
     """
     Wrapper for call to the airflow database to get a single action
     by id
     """
     return AIRFLOW_DB.get_dag_runs_like_id(dag_id=dag_id,
                                            execution_date=execution_date)
예제 #5
0
 def get_all_tasks_db(self):
     """
     Wrapper for call to the airflow db to get all tasks
     :returns: a list of task dictionaries
     """
     return AIRFLOW_DB.get_all_tasks()
예제 #6
0
 def get_all_dag_runs_db(self):
     """
     Wrapper for call to the airflow db to get all dag runs
     :returns: a list of dictionaries representing dag runs in airflow
     """
     return AIRFLOW_DB.get_all_dag_runs()
예제 #7
0
 def _get_all_dag_runs_db(self):
     """
     Wrapper for call to the airflow database to get all actions
     :returns: a list of dag_runs dictionaries
     """
     return AIRFLOW_DB.get_all_dag_runs()