# coding: utf-8
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from datetime import datetime, timedelta
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime(2017, 8, 10),
'email': ['fodorsz@mapsolutions.hu'],
'email_on_failure': True,
'email_on_retry': True,
'retries': 1,
'retry_delay': timedelta(minutes=5),
# 'queue': 'bash_queue',
# 'pool': 'backfill',
# 'priority_weight': 10,
# 'end_date': datetime(2016, 1, 1),
}
dag = DAG('Tajolo_leadek_GA', default_args=default_args,schedule_interval="0 10 * * *")
t1 = BashOperator(
task_id='GA_napi_adatmentes',
bash_command='python //home/fodorsz/GA_data_pipelines/Tajolo_lead_pw_letolt.py',
dag=dag)
t2 = BashOperator(
task_id='Stat_eloallitas',
bash_command='python //home/fodorsz/GA_data_pipelines/tajolo_statok.py',
dag=dag)
t2.set_upstream(t1)