Last active
June 24, 2016 01:12
-
-
Save fbdiehlad/9e356d9a303339eb3c3f1be3475efce2 to your computer and use it in GitHub Desktop.
This file contains 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 | |
from airflow.operators import PythonOperator | |
from datetime import datetime, timedelta | |
default_args = { | |
'owner': 'airflow', | |
'depends_on_past': False, | |
'start_date': datetime(2016, 5, 1), | |
'email': ['alex'], | |
'email_on_failure': True, | |
'email_on_retry': False, | |
'retries': 3, | |
'retry_delay': timedelta(minutes=5), | |
# 'queue': 'bash_queue', | |
# 'pool': 'backfill', | |
# 'priority_weight': 10, | |
# 'end_date': datetime(2016, 1, 1), | |
} | |
dag = DAG( | |
dag_id='python_testing_dag', | |
default_args=default_args, | |
schedule_interval='@daily' | |
) | |
def super_simple_python(**kwargs): | |
return 'Please no failures.' | |
test = PythonOperator( | |
task_id='testing', | |
python_callable=super_simple_python, | |
dag=dag | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment