Created
March 15, 2017 17:21
-
-
Save r39132/b44f7d791e11f882cde28a219df97c29 to your computer and use it in GitHub Desktop.
clear_task_bug_dag_1.0
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
from airflow import DAG, utils | |
from airflow.operators.dummy_operator import DummyOperator | |
from datetime import date, datetime, time, timedelta | |
today = datetime.today() | |
# Round to align with the schedule interval | |
START_DATE = today.replace(minute=0, second=0, microsecond=0) | |
DAG_NAME = 'clear_task_bug_dag_1.0' | |
default_args = { | |
'owner': 'sanand', | |
'depends_on_past': False, | |
'start_date': START_DATE, | |
'email': ['[email protected]'], | |
'email_on_failure': False, | |
'email_on_retry': False, | |
'retries': 1, | |
} | |
cron_schedule = '*/10 * * * *' | |
dag = DAG(DAG_NAME, schedule_interval=cron_schedule, | |
default_args=default_args | |
) | |
d1 = DummyOperator( | |
task_id = 'd1', | |
dag = dag | |
) | |
d2 = DummyOperator( | |
task_id = 'd2', | |
dag = dag | |
) | |
d3 = DummyOperator( | |
task_id = 'd3', | |
dag = dag | |
) | |
d4 = DummyOperator( | |
task_id = 'd4', | |
dag = dag | |
) | |
d2.set_upstream(d1) | |
d3.set_upstream(d2) | |
d4.set_upstream(d3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment