Last active
April 29, 2021 12:27
-
-
Save tameem92/118521a9de3a274ddbb43d66a964ab71 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION='v1.0.3' | |
# DAG Factory | |
factory = DAGFactory(config.environment) | |
process_invoices_dag = factory.create('ProcessInvoices', config.process_invoices).build() | |
process_messages_dag = factory.create('ProcessMessages', config.process_messages).build() | |
with DAG(dag_id=f'main_{VERSION}', | |
default_args=default_args, | |
schedule_interval=config.controller['schedule'], | |
catchup=False, | |
template_searchpath=['/home/airflow/gcs/dags'], | |
) as dag: | |
# Reconfigure the dag object as a subdag | |
# under our main dag | |
process_invoices = SubDagOperator( | |
task_id='process_invoices', | |
subdag=process_invoices_dag, | |
) | |
process_messages = SubDagOperator( | |
task_id='process_messages', | |
subdag=process_messages_dag, 'process_messages') | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment