Пример #1
0
    def get_preflight(self, task_id=dn.ALL_PREFLIGHT_CHECKS_DAG_NAME):
        """Generate the preflight step

        Preflight checks preconditions for running a DAG
        """
        return SubDagOperator(subdag=all_preflight_checks(
            self.parent_dag_name, task_id, args=self.default_args),
                              task_id=task_id,
                              on_failure_callback=step_failure_handler,
                              dag=self.dag)
Пример #2
0
    kwargs['ti'].xcom_push(key='action',
                           value=kwargs['dag_run'].conf['action'])


action_xcom = PythonOperator(task_id='action_xcom',
                             dag=dag,
                             python_callable=xcom_push)

concurrency_check = ConcurrencyCheckOperator(
    task_id=DAG_CONCURRENCY_CHECK_DAG_NAME,
    on_failure_callback=failure_handlers.step_failure_handler,
    dag=dag)

preflight = SubDagOperator(
    subdag=all_preflight_checks(PARENT_DAG_NAME,
                                ALL_PREFLIGHT_CHECKS_DAG_NAME,
                                args=default_args),
    task_id=ALL_PREFLIGHT_CHECKS_DAG_NAME,
    on_failure_callback=failure_handlers.step_failure_handler,
    dag=dag,
)

get_design_version = DeckhandOperator(
    task_id=DECKHAND_GET_DESIGN_VERSION,
    on_failure_callback=failure_handlers.step_failure_handler,
    dag=dag)

validate_site_design = SubDagOperator(
    subdag=validate_site_design(PARENT_DAG_NAME,
                                VALIDATE_SITE_DESIGN_DAG_NAME,
                                args=default_args),